Пример #1
0
        public static void SynAddressExcutive()
        {
            XmlDocument document = CreateAddressInfoInput();

            if (logFlag)
            {
                document.Save(logPath + @"\SynAddressInput.xml");
            }
            string xml = string.Empty;

            if (HttpsSender.SendMsg("0044", document.InnerXml, ref xml) == 0)
            {
                XmlDocument doc = new XmlDocument();
                doc.LoadXml(xml);
                if (logFlag)
                {
                    doc.Save(logPath + @"\SynAddressOutput.xml");
                }
                string msg = string.Empty;
                if (ParseAddressInfoOutput(doc, out msg))
                {
                    psxxDal.DeleteSynAddrInfos();
                    foreach (AddressInfo info in synAddr)
                    {
                        psxxDal.InsertAddrInfo(info, false);
                    }
                }
            }
        }
Пример #2
0
 public void method_1(bool bool_2, bool bool_3)
 {
     try
     {
         this.dateTime_0 = DateTime.Now;
         string str = string.Empty;
         if (bool_2 || (Class97.dataTable_0.Rows.Count < Class87.int_0))
         {
             if (((Class94.dictionary_0 != null) && bool_2) && (HttpsSender.TestConnect(Class94.dictionary_0, out str) != 0))
             {
                 Class101.smethod_0("(发票上传)不进行发票上传,原因:" + str);
             }
             else
             {
                 Class101.smethod_0("(上传线程)开始,是否在主线程运行:" + bool_2);
                 this.method_0(bool_2, bool_3, string.Empty, string.Empty, string.Empty, string.Empty);
                 Class101.smethod_0("(上传线程)结束,是否在主线程运行:" + bool_2);
             }
         }
     }
     catch (Exception exception)
     {
         Class101.smethod_1("发票上传异常!" + exception.ToString());
     }
 }
Пример #3
0
        protected override object[] doService(object[] param)
        {
            string startDate = param[0].ToString();
            string endDate   = param[1].ToString();
            string xml       = string.Empty;
            int    num       = HttpsSender.SendMsg("0040", AllocateCommon.RequestListInput(startDate, endDate), ref xml);

            if (num != 0)
            {
                XmlDocument    document = new XmlDocument();
                XmlDeclaration newChild = document.CreateXmlDeclaration("1.0", "GBK", null);
                document.PreserveWhitespace = false;
                document.AppendChild(newChild);
                XmlElement element = document.CreateElement("FPXT");
                document.AppendChild(element);
                XmlElement element2 = document.CreateElement("OUTPUT");
                element.AppendChild(element2);
                XmlElement element3 = document.CreateElement("CODE");
                element3.InnerText = num.ToString();
                element2.AppendChild(element3);
                XmlElement element4 = document.CreateElement("MESS");
                element4.InnerText = xml;
                element2.AppendChild(element4);
                document.PreserveWhitespace = true;
                return(new object[] { document.InnerXml });
            }
            XmlDocument document2 = new XmlDocument();

            document2.LoadXml(xml);
            return(new object[] { document2.InnerXml });
        }
Пример #4
0
        private string CanEmptyRedFp()
        {
            string str = "";

            if ((((int)this.fplx != 2) && ((int)this.fplx != 0x33)) || base.TaxCardInstance.QYLX.ISTDQY)
            {
                return(str);
            }
            string    xml     = "";
            int       num     = int.Parse(this.blueFphm);
            FpManager manager = new FpManager();
            string    xfsh    = manager.GetXfsh();
            string    str4    = new StringBuilder().Append("<?xml version=\"1.0\" encoding=\"GBK\"?>").Append("<FPXT><INPUT>").Append("<NSRSBH>").Append(xfsh).Append("</NSRSBH>").Append("<KPJH>").Append(base.TaxCardInstance.Machine).Append("</KPJH>").Append("<SBBH>").Append(manager.GetMachineNum()).Append("</SBBH>").Append("<LZFPDM>").Append(this.blueFpdm).Append("</LZFPDM>").Append("<LZFPHM>").Append(string.Format("{0:00000000}", num)).Append("</LZFPHM>").Append("<FPZL>").Append(((int)this.fplx == 2) ? "c" : "p").Append("</FPZL>").Append("</INPUT></FPXT>").ToString();

            if (HttpsSender.SendMsg("0007", str4, out xml) == 0)
            {
                decimal     num2;
                XmlDocument document1 = new XmlDocument();
                document1.LoadXml(xml);
                decimal.TryParse(document1.SelectSingleNode("/FPXT/OUTPUT").SelectSingleNode("HZJE").InnerText, out num2);
                if (num2 <= decimal.Zero)
                {
                    str = "数据库中未找到对应的蓝票,且受理平台无可开红字发票金额,不能开红字发票";
                }
                return(str);
            }
            return("数据库中未找到对应的蓝票,且与受理平台网络不通,不能开红字发票");
        }
Пример #5
0
 public void UpdateSPFL()
 {
     try
     {
         MessageHelper.MsgWait("正在同步" + Class95.string_2 + "信息,请耐心等待...");
         Class84 class2 = new Class84();
         string  str    = class2.method_31();
         string  str2   = "";
         Class101.smethod_0("商品分类信息同步,发送给局端数据:" + str);
         if (HttpsSender.SendMsg("0037", str, out str2) != 0)
         {
             Class101.smethod_1("商品分类更新失败:" + str2);
             if (!this.isAuto)
             {
                 MessageHelper.MsgWait();
                 Class86.smethod_7(Class95.string_2 + "更新失败,请选择手动更新或去税局下载更新包导入更新:" + str2);
             }
         }
         else
         {
             Class101.smethod_1("商品分类信息同步,局端返回数据:" + str2);
             class2.method_32(str2, this.isAuto);
         }
         MessageHelper.MsgWait();
     }
     catch (Exception exception)
     {
         MessageHelper.MsgWait();
         Class101.smethod_1("UpdateSPFL:" + exception.ToString());
         if (!this.isAuto)
         {
             Class86.smethod_7("商品和服务税收分类编码更新失败,请选择手动更新或去税局下载更新包导入更新:" + exception.Message);
         }
     }
 }
Пример #6
0
        public static bool AllocateOneVolume(UnlockInvoice unlockVolume, out bool isDeviceError, out string msg)
        {
            XmlDocument document = CreateAllocateInput(unlockVolume);

            if (logFlag)
            {
                document.Save(logPath + @"\AllocateInput.xml");
            }
            string xml = string.Empty;

            if (HttpsSender.SendMsg("0040", document.InnerXml, ref xml) != 0)
            {
                isDeviceError = false;
                msg           = xml;
                return(false);
            }
            XmlDocument doc = new XmlDocument();

            doc.LoadXml(xml);
            if (logFlag)
            {
                doc.Save(logPath + @"\AllocateOutput.xml");
            }
            return(ParseAllocateOutput(doc, out isDeviceError, out msg));
        }
Пример #7
0
 public void TestIsServerUp()
 {
     Class101.smethod_0("测试是不是服务器上传方式");
     try
     {
         Class87.bool_5 = this.taxCard_0.GetExtandParams("FLBMFlag") == "FLBM";
         XmlDocument document = new XmlDocument();
         document.AppendChild(document.CreateXmlDeclaration("1.0", "GBK", ""));
         XmlElement newChild = document.CreateElement("ISSERVERUP");
         document.AppendChild(newChild);
         string str = "";
         if (HttpsSender.SendMsg(this.string_0, document.InnerXml, out str) == 0)
         {
             XmlDocument document2 = new XmlDocument();
             document2.LoadXml(str);
             XmlNodeList elementsByTagName = document2.GetElementsByTagName("ISSERVERUP");
             if (((elementsByTagName != null) && (elementsByTagName.Count > 0)) && (elementsByTagName[0].InnerText.Trim() == "1"))
             {
                 Class87.bool_4 = true;
                 Class101.smethod_0("服务器上传方式:" + elementsByTagName[0].InnerText);
             }
         }
     }
     catch (Exception exception)
     {
         Class101.smethod_0("TestIsServerUp:" + exception.ToString());
     }
     Class101.smethod_0("结束测试是不是服务器上传方式");
 }
Пример #8
0
 private bool RevokeVolumes(string invTypeName, string applySeqNum, string applyTypeCode, string applyAmount)
 {
     if (ApplyCommon.IsHxInvType(invTypeName))
     {
         XmlDocument document = this.CreateHxRevokeInput(applySeqNum, applyTypeCode, applyAmount);
         if (this.logFlag)
         {
             document.Save(this.logPath + "HxRevokeInput.xml");
         }
         string xml = string.Empty;
         if (HttpsSender.SendMsg("0041", document.InnerXml, ref xml) != 0)
         {
             MessageManager.ShowMsgBox(xml);
             return(false);
         }
         XmlDocument docFeedback = new XmlDocument();
         docFeedback.LoadXml(xml);
         if (this.logFlag)
         {
             docFeedback.Save(this.logPath + @"\HxRevokeOutput.xml");
         }
         string msg = string.Empty;
         if (!this.ParseHxRevokeOutput(docFeedback, out msg))
         {
             MessageManager.ShowMsgBox(msg);
             return(false);
         }
         return(true);
     }
     if (ApplyCommon.IsZcInvType(invTypeName))
     {
         XmlDocument document3 = this.CreateZcRevokeInput(applySeqNum);
         if (this.logFlag)
         {
             document3.Save(this.logPath + "ZcRevokeInput.xml");
         }
         string str3 = string.Empty;
         if (HttpsSender.SendMsg("0042", document3.InnerXml, ref str3) != 0)
         {
             MessageManager.ShowMsgBox(str3);
             return(false);
         }
         XmlDocument document4 = new XmlDocument();
         document4.LoadXml(str3);
         if (this.logFlag)
         {
             document4.Save(this.logPath + @"\ZcRevokeOutput.xml");
         }
         string str4 = string.Empty;
         if (!this.ParseZcRevokeOutput(document4, out str4))
         {
             MessageManager.ShowMsgBox(str4);
             return(false);
         }
         return(true);
     }
     MessageManager.ShowMsgBox("INP-441200");
     return(false);
 }
Пример #9
0
 private void DownloadFPFile(string filePath)
 {
     if ((ConfigProperty.dictFileInfo.Count < 1) || !ConfigProperty.dictFileInfo.ContainsValue("0"))
     {
         MessageHelper.MsgWait();
     }
     else
     {
         MessageHelper.MsgWait("正在下载服务器上抵扣发票信息,请耐心等待...");
         PLXZBLL plxzbll = new PLXZBLL();
         try
         {
             Dictionary <string, string> dictionary = new Dictionary <string, string>();
             foreach (KeyValuePair <string, string> pair in ConfigProperty.dictFileInfo)
             {
                 dictionary.Add(pair.Key, pair.Value);
             }
             foreach (KeyValuePair <string, string> pair2 in dictionary)
             {
                 if (pair2.Value == "0")
                 {
                     string downloadParam = plxzbll.GetDownloadParam(pair2.Key);
                     string text          = "";
                     this.loger.Debug("下载发送受理开始");
                     int num = HttpsSender.SendMsg("0035", downloadParam, out text);
                     this.loger.Debug("下载发送受理结束");
                     if (num != 0)
                     {
                         MessageHelper.MsgWait();
                         MessageBox.Show(text, "错误", MessageBoxButtons.OK, MessageBoxIcon.Hand);
                     }
                     else if (text == "")
                     {
                         MessageHelper.MsgWait();
                         MessageBox.Show("未下载到抵扣发票文件,服务器返回为空:" + pair2.Key, "错误", MessageBoxButtons.OK, MessageBoxIcon.Hand);
                     }
                     else
                     {
                         plxzbll.AnalysXZResult(text, filePath, pair2.Key);
                     }
                     MessageHelper.MsgWait();
                 }
             }
             dictionary.Clear();
             dictionary = null;
         }
         catch (Exception exception)
         {
             MessageHelper.MsgWait();
             MessageBox.Show(exception.Message, "错误", MessageBoxButtons.OK, MessageBoxIcon.Hand);
             this.loger.Error("CXFPInfo:" + exception.ToString());
         }
         MessageHelper.MsgWait();
     }
 }
Пример #10
0
 private void ClearBuffer(byte fplx)
 {
     byte[] buffer = null;
     if ((fplx == 0) || (2 == fplx))
     {
         buffer = new byte[1];
     }
     else if (((11 == fplx) || (12 == fplx)) || (0x33 == fplx))
     {
         buffer = new byte[] { 11 };
     }
     foreach (byte num in buffer)
     {
         UnlockInvoice invoice = this.TaxCardInstance.NInvGetUnlockInvoice(num);
         if (this.TaxCardInstance.get_RetCode() != 0)
         {
             MessageManager.ShowMsgBox(this.TaxCardInstance.get_ErrCode());
             break;
         }
         if (!DownloadCommon.CheckEmpty(invoice.Buffer))
         {
             InvVolumeApp confirmVolumn = new InvVolumeApp {
                 InvType  = Convert.ToByte(invoice.get_Kind()),
                 TypeCode = invoice.get_TypeCode(),
                 HeadCode = Convert.ToUInt32(invoice.get_Number()),
                 Number   = Convert.ToUInt16(invoice.get_Count())
             };
             bool   withOperation = true;
             string str           = string.Empty;
             string xml           = string.Empty;
             if (((confirmVolumn.InvType == 0) || (2 == confirmVolumn.InvType)) || (12 == confirmVolumn.InvType))
             {
                 str           = "0040";
                 withOperation = true;
             }
             else if (0x33 == confirmVolumn.InvType)
             {
                 str           = "0020";
                 withOperation = false;
             }
             if (HttpsSender.SendMsg(str, this.RequestDownloadInput(null, confirmVolumn, Convert.ToBase64String(invoice.Buffer), withOperation), ref xml) != 0)
             {
                 MessageManager.ShowMsgBox(xml);
                 break;
             }
             XmlDocument downInvXml = new XmlDocument();
             downInvXml.LoadXml(xml);
             if (this.logFlag)
             {
                 downInvXml.Save(this.logPath + @"\AllocateRequestDownloadOutput.xml");
             }
             this.RequestDownloadOutput(downInvXml);
         }
     }
 }
Пример #11
0
 private void btnQuery_Click(object sender, EventArgs e)
 {
     this.reqInvList.Clear();
     if ((this.chkQS.Checked && this.chkJZ.Checked) && (this.data_ksrq.Value > this.data_jsrq.Value))
     {
         MessageManager.ShowMsgBox("INP-441203");
     }
     else
     {
         string xml = string.Empty;
         if (HttpsSender.SendMsg("0019", this.RequestListInput(), ref xml) != 0)
         {
             MessageManager.ShowMsgBox(xml);
         }
         else
         {
             XmlDocument invList = new XmlDocument();
             invList.LoadXml(xml);
             if (this.logFlag)
             {
                 invList.Save(this.logPath + @"\RequestListOutput.xml");
             }
             List <InvVolumeApp> listModel = this.RequestListOutput(invList);
             listModel.Sort(delegate(InvVolumeApp left, InvVolumeApp right) {
                 if (left.InvType > right.InvType)
                 {
                     return(1);
                 }
                 if (left.InvType == right.InvType)
                 {
                     if (Convert.ToInt64(left.TypeCode) > Convert.ToInt64(right.TypeCode))
                     {
                         return(1);
                     }
                     if (Convert.ToInt64(left.TypeCode) != Convert.ToInt64(right.TypeCode))
                     {
                         return(-1);
                     }
                     if (left.HeadCode > right.HeadCode)
                     {
                         return(1);
                     }
                     if (left.HeadCode == right.HeadCode)
                     {
                         return(0);
                     }
                 }
                 return(-1);
             });
             this.InsertData(listModel);
         }
     }
 }
 private void btn_Ok_Click(object sender, EventArgs e)
 {
     if (this.data_ksrq.Value > this.data_jsrq.Value)
     {
         MessageManager.ShowMsgBox("INP-441203");
     }
     else if (this.CheckValid())
     {
         base.Close();
         XmlDocument document = this.CreateQueryInput();
         if (this.logFlag)
         {
             document.Save(this.logPath + "DownloadQueryInput.xml");
         }
         string xml = string.Empty;
         if (HttpsSender.SendMsg("0034", document.InnerXml, ref xml) != 0)
         {
             MessageManager.ShowMsgBox(xml);
         }
         else
         {
             XmlDocument doc = new XmlDocument();
             doc.LoadXml(xml);
             if (this.logFlag)
             {
                 doc.Save(this.logPath + @"\DownloadQueryOutput.xml");
             }
             string msg = string.Empty;
             if (!this.ParseDownloadQueryOutput(doc, out msg))
             {
                 MessageManager.ShowMsgBox(msg);
             }
             else if (this.outList.Count == 0)
             {
                 MessageManager.ShowMsgBox("INP-441241");
             }
             else
             {
                 new DownloadQueryList(this.outList).ShowDialog();
             }
         }
     }
 }
Пример #13
0
        private string CanEmptyRedFp(string dm, string hm, string djje)
        {
            string str = "";

            if ((((int)this.mFplx != 2) && ((int)this.mFplx != 0x33)) || this.taxCard.QYLX.ISTDQY)
            {
                return(str);
            }
            string    xml     = "";
            int       num     = int.Parse(hm);
            FpManager manager = new FpManager();
            string    xfsh    = manager.GetXfsh();
            string    str4    = new StringBuilder().Append("<?xml version=\"1.0\" encoding=\"GBK\"?>").Append("<FPXT><INPUT>").Append("<NSRSBH>").Append(xfsh).Append("</NSRSBH>").Append("<KPJH>").Append(this.taxCard.Machine).Append("</KPJH>").Append("<SBBH>").Append(manager.GetMachineNum()).Append("</SBBH>").Append("<LZFPDM>").Append(dm).Append("</LZFPDM>").Append("<LZFPHM>").Append(string.Format("{0:00000000}", num)).Append("</LZFPHM>").Append("<FPZL>").Append(((int)this.mFplx == 2) ? "c" : "p").Append("</FPZL>").Append("</INPUT></FPXT>").ToString();

            if (HttpsSender.SendMsg("0007", str4, out xml) == 0)
            {
                XmlDocument document1 = new XmlDocument();
                document1.LoadXml(xml);
                XmlNode node1     = document1.SelectSingleNode("/FPXT/OUTPUT");
                string  innerText = node1.SelectSingleNode("HZJE").InnerText;
                if (node1.SelectSingleNode("CODE").InnerText.Trim().Equals("0000"))
                {
                    if (!innerText.Trim().Equals("-0"))
                    {
                        decimal num2;
                        decimal num3;
                        decimal.TryParse(innerText, out num2);
                        decimal.TryParse(djje, out num3);
                        if (num2 <= decimal.Zero)
                        {
                            return("数据库中未找到对应的蓝票,且受理平台无可开红字发票金额,不能开红字发票");
                        }
                        if (num2.CompareTo(Math.Abs(num3)) < 0)
                        {
                            str = string.Format("销项红字发票填开金额超过对应蓝字发票金额!\n本张发票填开限额:¥{0}\n所开发票已填金额:¥{1}", decimal.Negate(num2).ToString("F2"), num3.ToString("F2"));
                        }
                    }
                    return(str);
                }
                return("数据库中未找到对应的蓝票,且与受理平台网络不通,不能开红字发票");
            }
            return("数据库中未找到对应的蓝票,且与受理平台网络不通,不能开红字发票");
        }
 private void btnOK_Click(object sender, EventArgs e)
 {
     if (this.date_ksrq.Value > this.date_jsrq.Value)
     {
         MessageManager.ShowMsgBox("INP-441203");
     }
     else if (this.CheckValid())
     {
         base.Close();
         XmlDocument document = AllocateCommon.CreateAllocateQueryInput(this.queryParams);
         if (this.logFlag)
         {
             document.Save(this.logPath + "AllocateQueryInput.xml");
         }
         string xml = string.Empty;
         if (HttpsSender.SendMsg("0040", document.InnerXml, ref xml) != 0)
         {
             MessageManager.ShowMsgBox(xml);
         }
         else
         {
             XmlDocument doc = new XmlDocument();
             doc.LoadXml(xml);
             if (this.logFlag)
             {
                 doc.Save(this.logPath + @"\AllocateQueryOutput.xml");
             }
             string msg = string.Empty;
             if (!AllocateCommon.ParseAllocateQueryOutput(doc, out msg, out this.outList))
             {
                 MessageManager.ShowMsgBox(msg);
             }
             else if (this.outList.Count == 0)
             {
                 MessageManager.ShowMsgBox("INP-441207", new string[] { "查询", "分配" });
             }
             else
             {
                 new AllocateQueryList(this.outList).ShowDialog();
             }
         }
     }
 }
Пример #15
0
 private void method_1()
 {
     if (File.Exists(this.string_1))
     {
         File.Delete(this.string_1);
     }
     if ((this.string_0 != "") && (this.string_1 != ""))
     {
         try
         {
             string str = "";
             Class101.smethod_0("开始企业信息上传,【企业参数同步】上传报文:" + this.string_0);
             if (HttpsSender.SendMsg("0001", this.string_0, out str) != 0)
             {
                 Class101.smethod_1("企业信息上传失败!    " + str.ToString());
                 Class95.bool_0   = false;
                 Class95.string_0 = "企业参数更新失败:" + str;
                 Class95.bool_1   = false;
                 Class95.string_1 = Class95.string_2 + "同步失败:" + str;
                 if (Class87.bool_3)
                 {
                     Class87.dictionary_0["UpdateBZ"] = "0";
                     Class87.dictionary_0["Message"]  = str;
                 }
             }
             else
             {
                 XmlDocument document = new XmlDocument();
                 document.LoadXml(str);
                 document.Save(this.string_1);
             }
         }
         catch (Exception exception)
         {
             Class101.smethod_1("DownloadQYSQXX异常:" + exception.ToString());
         }
     }
     else
     {
         Class101.smethod_0("开始企业参数同步:contentToServer" + this.string_0 + "   filename:" + this.string_1);
     }
 }
Пример #16
0
        public static bool DownloadAdminType()
        {
            XmlDocument document = CreateGetAdminTypeInput();

            if (logFlag)
            {
                document.Save(logPath + @"\GetAdminTypeInput.xml");
            }
            string xml = string.Empty;

            if (HttpsSender.SendMsg("0043", document.InnerXml, ref xml) != 0)
            {
                MessageManager.ShowMsgBox(xml);
                return(false);
            }
            XmlDocument doc = new XmlDocument();

            doc.LoadXml(xml);
            return(ParseGetAdminTypeOutput(doc));
        }
Пример #17
0
        public void UPDownLoadFP()
        {
            try
            {
                string str;
                this.int_0 = this.method_2();
                if (this.int_0 < 1)
                {
                    Class101.smethod_0("UPDownLoadFP begin:" + this.int_0 + "  没有需要上传数据,退出UPDownLoadFP");
                    return;
                }
                Class101.smethod_0("UPDownLoadFP begin:" + this.int_0);
                int num = 0;
                while (num < this.int_0)
                {
                    Thread.Sleep(0x7d0);
                    string str2 = this.method_0((num + 1).ToString());
                    if (str2.Trim() == "")
                    {
                        break;
                    }
                    str = "";
                    if (HttpsSender.SendMsg(this.string_0, str2, out str) != 0)
                    {
                        goto Label_00F3;
                    }
                    Class101.smethod_0(string.Concat(new object[] { "UPDownLoadFP ", num, "  服务器返回数据:", str }));
                    this.method_1(str);
                    num++;
                }
                goto Label_0128;
                Label_00F3 :;
                Class101.smethod_0(string.Concat(new object[] { "UPDownLoadFP ", num, " 服务器返回错误信息:", str }));
Label_0128:
                Class101.smethod_0("UPDownLoadFP over:");
            }
            catch (Exception exception)
            {
                Class101.smethod_1("UPDownLoadFP:" + exception.ToString());
            }
        }
Пример #18
0
 private static void ZcQueryOperate(QueryCondition qCondition, List <OneTypeVolumes> applyQueryList, bool isConfirmQuery)
 {
     try
     {
         XmlDocument document = CreateZCQueryStateInput(qCondition);
         if (logFlag)
         {
             document.Save(logPath + "ZcQueryStatusInput.xml");
         }
         string xml = string.Empty;
         if (HttpsSender.SendMsg("0025", document.InnerXml, ref xml) != 0)
         {
             MessageManager.ShowMsgBox(xml);
         }
         else
         {
             XmlDocument doc = new XmlDocument();
             doc.LoadXml(xml);
             if (logFlag)
             {
                 doc.Save(logPath + @"\ZcQueryStatusOutput.xml");
             }
             string msg = string.Empty;
             if (!ParseZCQueryStateOutput(doc, out msg, applyQueryList, isConfirmQuery))
             {
                 MessageManager.ShowMsgBox(msg);
             }
         }
     }
     catch (BaseException exception)
     {
         ExceptionHandler.HandleError(exception);
     }
     catch (Exception exception2)
     {
         ExceptionHandler.HandleError(exception2);
     }
 }
        protected override object[] doService(object[] param)
        {
            List <string> queryParams = new List <string>();

            foreach (object obj2 in param)
            {
                queryParams.Add(obj2.ToString());
            }
            XmlDocument document = AllocateCommon.CreateAllocateQueryInput(queryParams);
            int         num      = 0;
            string      xml      = string.Empty;

            num = HttpsSender.SendMsg("0040", document.InnerXml, ref xml);
            if (num != 0)
            {
                XmlDocument    document2 = new XmlDocument();
                XmlDeclaration newChild  = document2.CreateXmlDeclaration("1.0", "GBK", null);
                document2.PreserveWhitespace = false;
                document2.AppendChild(newChild);
                XmlElement element = document2.CreateElement("FPXT");
                document2.AppendChild(element);
                XmlElement element2 = document2.CreateElement("OUTPUT");
                element.AppendChild(element2);
                XmlElement element3 = document2.CreateElement("CODE");
                element3.InnerText = num.ToString();
                element2.AppendChild(element3);
                XmlElement element4 = document2.CreateElement("MESS");
                element4.InnerText = xml;
                element2.AppendChild(element4);
                document2.PreserveWhitespace = true;
                return(new object[] { document2.InnerXml });
            }
            XmlDocument document3 = new XmlDocument();

            document3.LoadXml(xml);
            return(new object[] { document3.InnerXml });
        }
Пример #20
0
        private bool ClearAllocateBuffer()
        {
            UnlockInvoice invoice = this.TaxCardInstance.NInvGetUnlockInvoice(11);

            if (this.TaxCardInstance.get_RetCode() != 0)
            {
                MessageManager.ShowMsgBox(this.TaxCardInstance.get_ErrCode());
                return(false);
            }
            if (!DownloadCommon.CheckEmpty(invoice.Buffer))
            {
                InvVolumeApp confirmVolumn = new InvVolumeApp {
                    InvType  = Convert.ToByte(invoice.get_Kind()),
                    TypeCode = invoice.get_TypeCode(),
                    HeadCode = Convert.ToUInt32(invoice.get_Number()),
                    Number   = Convert.ToUInt16(invoice.get_Count())
                };
                if (0x33 == confirmVolumn.InvType)
                {
                    return(true);
                }
                string xml = string.Empty;
                if (HttpsSender.SendMsg("0040", this.RequestDownloadInput(null, confirmVolumn, Convert.ToBase64String(invoice.Buffer), true), ref xml) != 0)
                {
                    MessageManager.ShowMsgBox(xml);
                    return(false);
                }
                XmlDocument downInvXml = new XmlDocument();
                downInvXml.LoadXml(xml);
                if (this.logFlag)
                {
                    downInvXml.Save(this.logPath + @"\AllocateRequestDownloadOutput.xml");
                }
                this.RequestDownloadOutput(downInvXml);
            }
            return(true);
        }
Пример #21
0
 private void CXFPInfo()
 {
     MessageHelper.MsgWait("正在查询服务器上抵扣发票信息,请耐心等待...");
     try
     {
         PLXZBLL plxzbll = new PLXZBLL();
         string  cXParam = plxzbll.GetCXParam();
         int     num     = -1;
         string  text    = "";
         this.loger.Debug("查询发送受理开始");
         num = HttpsSender.SendMsg(ConfigProperty.opType, cXParam, out text);
         this.loger.Debug("查询发送受理结束");
         if (num != 0)
         {
             MessageHelper.MsgWait();
             MessageBox.Show(text, "错误", MessageBoxButtons.OK, MessageBoxIcon.Hand);
         }
         else if (text == "")
         {
             MessageHelper.MsgWait();
             MessageBox.Show("未查询到抵扣发票信息,服务器返回为空!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Hand);
         }
         else
         {
             ConfigProperty.dictFileInfo.Clear();
             plxzbll.AnalysCXResult(text);
         }
     }
     catch (Exception exception)
     {
         MessageHelper.MsgWait();
         MessageBox.Show(exception.Message, "错误", MessageBoxButtons.OK, MessageBoxIcon.Hand);
         this.loger.Error("CXFPInfo:" + exception.ToString());
     }
     MessageHelper.MsgWait();
 }
Пример #22
0
        private void BtnDownload_Click(object sender, EventArgs e)
        {
            string str = string.Empty;
            string xml = string.Empty;

            try
            {
                base.DialogResult = DialogResult.OK;
                int num = 0;
                str = this.GenDownloadXML();
                if (str == null)
                {
                    MessageBoxHelper.Show("请正确输入抵扣发票下载条件!");
                    base.DialogResult = DialogResult.Retry;
                }
                else
                {
                    this.progressBar.SetTip("正在连接服务器", "请等待任务完成", "发票下载中");
                    this.progressBar.fpxf_progressBar.Value = 0x3e8;
                    this.progressBar.Visible = true;
                    this.progressBar.Refresh();
                    this.progressBar.Show();
                    this.ProcessStartThread(this.step);
                    this.progressBar.Refresh();
                    HttpsSender.SendMsg("0012", str, out xml);
                    this.progressBar.SetTip("正在下载发票", "请等待任务完成", "发票下载中");
                    this.ProcessStartThread(this.step * 3);
                    this.progressBar.Refresh();
                    switch (xml)
                    {
                    case null:
                    case "":
                        xml = "受理服务器没有返回数据。";
                        break;
                    }
                    List <Aisino.Fwkp.Fpkj.Model.DKFP> dkfps = new List <Aisino.Fwkp.Fpkj.Model.DKFP>();
                    XmlDocument document  = new XmlDocument();
                    string      innerText = "";
                    if (xml != "")
                    {
                        document.LoadXml(xml);
                        System.Xml.XmlNode node2 = document.SelectSingleNode("/FPXT").SelectSingleNode("OUTPUT");
                        if (node2 != null)
                        {
                            System.Xml.XmlNode node3 = node2.SelectSingleNode("CODE");
                            if (node3 != null)
                            {
                                innerText = node3.InnerText;
                                if (node3.InnerText == "0000")
                                {
                                    System.Xml.XmlNode node4 = node2.SelectSingleNode("DATA");
                                    if (node4 != null)
                                    {
                                        System.Xml.XmlNode node5 = node4.SelectSingleNode("RZFP");
                                        if (node5 != null)
                                        {
                                            XmlNodeList list2 = node5.SelectNodes("FPXX");
                                            if (list2 != null)
                                            {
                                                foreach (System.Xml.XmlNode node6 in list2)
                                                {
                                                    Aisino.Fwkp.Fpkj.Model.DKFP item = new Aisino.Fwkp.Fpkj.Model.DKFP {
                                                        FPDM  = node6.SelectSingleNode("FPDM").InnerText.Trim(),
                                                        FPHM  = Convert.ToInt32(node6.SelectSingleNode("FPHM").InnerText.Trim()),
                                                        FPLX  = node6.SelectSingleNode("FPLX").InnerText.Trim(),
                                                        RZLX  = node6.SelectSingleNode("RZLX").InnerText.Trim(),
                                                        KPRQ  = Convert.ToDateTime(this.ConvertDateFormat(node6.SelectSingleNode("KPRQ").InnerText.Trim())),
                                                        RZRQ  = Convert.ToDateTime(this.ConvertDateFormat(node6.SelectSingleNode("RZRQ").InnerText.Trim())),
                                                        XFSBH = node6.SelectSingleNode("XFSBH").InnerText.Trim(),
                                                        JE    = Convert.ToDouble(node6.SelectSingleNode("JE").InnerText.Trim()),
                                                        SE    = Convert.ToDouble(node6.SelectSingleNode("SE").InnerText.Trim()),
                                                        JSPH  = "",
                                                        KPJH  = "",
                                                        XZSJ  = DateTime.Now
                                                    };
                                                    dkfps.Add(item);
                                                    num++;
                                                }
                                            }
                                        }
                                    }
                                }
                                else
                                {
                                    System.Xml.XmlNode node7 = node2.SelectSingleNode("MESS");
                                    if ((node7.InnerText == null) || (node7.InnerText == ""))
                                    {
                                        node7.InnerText = "下载服务器错误";
                                    }
                                    MessageManager.ShowMsgBox("DKFPXZ-0003", "提示", new string[] { node7.InnerText });
                                }
                            }
                        }
                        if (num > 0)
                        {
                            this.progressBar.SetTip("正在保存发票", "请等待任务完成", "发票下载中");
                            this.ProcessStartThread(this.step * 4);
                            this.progressBar.Refresh();
                            this.progressBar.Visible = false;
                            int num2 = this.SaveDkfpToDb(dkfps);
                            if (num == num2)
                            {
                                MessageManager.ShowMsgBox("DKFPXZ-0004", "提示", new string[] { num2.ToString() });
                            }
                            else
                            {
                                string[] strArray3 = new string[] { num.ToString(), num2.ToString(), (num - num2).ToString() };
                                MessageManager.ShowMsgBox("DKFPXZ-0005", "错误", strArray3);
                            }
                            this.ProcessStartThread(this.step * 4);
                            this.progressBar.Refresh();
                            this.progressBar.Visible = false;
                        }
                        else if ((num == 0) && (innerText == "0000"))
                        {
                            MessageManager.ShowMsgBox("DKFPXZ-0006");
                            this.progressBar.Visible = false;
                            this.Refresh();
                        }
                    }
                    else
                    {
                        MessageManager.ShowMsgBox("DKFPXZ-0003", "提示", new string[] { xml });
                        this.ProcessStartThread(this.step * 4);
                        this.progressBar.Refresh();
                        this.progressBar.Visible = false;
                    }
                    this.Refresh();
                }
            }
            catch (Exception exception)
            {
                MessageManager.ShowMsgBox("DKFPXZ-0003", "提示", new string[] { xml });
                this.loger.Error(exception.Message);
                this.ProcessStartThread(this.step * 4);
                this.progressBar.Visible = false;
                this.Refresh();
            }
            finally
            {
                this.progressBar.Visible = false;
                this.Refresh();
            }
        }
Пример #23
0
        private void method_2()
        {
            try
            {
                Class101.smethod_0("进入beginDownloadTread");
                Class87.list_1.Clear();
                if (this.bool_0)
                {
                    this.int_0       = 0;
                    this.int_1       = 0;
                    this.dataTable_0 = this.class100_0.method_4();
                }
                if (((this.dataTable_0 != null) && (this.dataTable_0.Rows.Count >= 1)) && ((this.int_0 < this.dataTable_0.Rows.Count) && (this.int_1 < this.dataTable_0.Rows.Count)))
                {
                    this.int_1 = this.int_0 + 10;
                    if (this.int_1 > this.dataTable_0.Rows.Count)
                    {
                        this.int_1 = this.dataTable_0.Rows.Count;
                    }
                    this.bool_0 = false;
                    this.dataTable_1.Clear();
                    for (int i = this.int_0; i < this.int_1; i++)
                    {
                        this.dataTable_1.Rows.Add(this.dataTable_0.Rows[i].ItemArray);
                    }
                    this.list_0.Clear();
                    this.list_0 = this.class84_0.method_5(this.dataTable_1);
                    XmlDocument document = new XmlDocument();
                    string      str      = "";
                    Class101.smethod_0("Begin For Loop : " + this.list_0.Count.ToString());
                    for (int j = 0; j < this.list_0.Count; j++)
                    {
                        Class101.smethod_1("(下载线程)开始下载发票信息!");
                        Class103.smethod_0(this.list_0[j], "DownMethodToServer" + j);
                        string str2 = this.class84_0.method_28(this.list_0[j]);
                        Class101.smethod_0("(发票下载)通过受理序列号得到的票种为:" + str2);
                        if (!str2.Equals("q") && !str2.Equals("JSFP"))
                        {
                            if (HttpsSender.SendMsg("0004", this.list_0[j].InnerXml.ToString(), out str) == 0)
                            {
                                goto Label_02AC;
                            }
                            this.class84_0.method_22(this.list_0[j], str, 3);
                            Class101.smethod_1("(下载线程)发票下载失败!            " + str);
                            continue;
                        }
                        Class101.smethod_0("(发票下载)开始卷票上传,原文:" + this.list_0[j].InnerXml);
                        if (HttpsSender.SendMsg("0030", this.list_0[j].InnerXml.ToString(), out str) != 0)
                        {
                            this.class84_0.method_22(this.list_0[j], str, 3);
                            Class101.smethod_1("(下载线程)发票下载失败!            " + str);
                            continue;
                        }
Label_02AC:
                        Class101.smethod_0("(下载线程)开始下载发票信息结束,准备解析服务器返回数据:" + str);
                        document.LoadXml(str);
                        Class103.smethod_0(document, "DownMethodFromServer" + j);
                        Class101.smethod_0("开始调用AnalyzeDownMethodXmlDoc,发送给局端数据:" + this.list_0[j].InnerXml);
                        this.class84_0.method_9(document, this.list_0[j]);
                    }
                    Class88.smethod_1();
                    Class88.smethod_4();
                    this.int_0 += 10;
                }
                else
                {
                    this.bool_0 = true;
                    this.dataTable_0.Clear();
                    this.dataTable_1.Clear();
                }
            }
            catch (Exception exception)
            {
                Class101.smethod_1("(下载线程)发票下载失败!" + exception.ToString());
            }
        }
Пример #24
0
        private void tool_xiazai_Click(object sender, EventArgs e)
        {
            try
            {
                string str   = string.Empty;
                string str2  = string.Empty;
                string str3  = string.Empty;
                string str4  = string.Empty;
                string xxbbh = string.Empty;
                str  = base.TaxCardInstance.TaxCode;
                str2 = base.TaxCardInstance.GetInvControlNum().Trim();
                HyXiaZaiTiaoJian jian = new HyXiaZaiTiaoJian {
                    AisinoGrid = this.aisinoGrid
                };
                if (jian.ShowDialog(this) == DialogResult.OK)
                {
                    str3  = jian.DateTimeStart.ToString("yyyyMMdd");
                    str4  = jian.DateTimeEnd.ToString("yyyyMMdd");
                    xxbbh = jian.Xxbbh;
                    XmlDocument    document = new XmlDocument();
                    XmlDeclaration newChild = document.CreateXmlDeclaration("1.0", "GBK", null);
                    document.PreserveWhitespace = false;
                    document.AppendChild(newChild);
                    XmlElement element = document.CreateElement("business");
                    element.SetAttribute("id", "HX_HZXXBXZ");
                    element.SetAttribute("comment", "红字信息表下载");
                    document.AppendChild(element);
                    XmlElement element2 = document.CreateElement("body");
                    element2.SetAttribute("count", "1");
                    element2.SetAttribute("skph", str2);
                    element2.SetAttribute("nsrsbh", str);
                    element.AppendChild(element2);
                    XmlElement element3 = document.CreateElement("group");
                    element3.SetAttribute("xh", "1");
                    element2.AppendChild(element3);
                    XmlElement element4 = document.CreateElement("data");
                    element4.SetAttribute("name", "fplx_dm");
                    element4.SetAttribute("value", "009");
                    element3.AppendChild(element4);
                    XmlElement element5 = document.CreateElement("data");
                    element5.SetAttribute("name", "xxbbh");
                    element5.SetAttribute("value", xxbbh);
                    element3.AppendChild(element5);
                    XmlElement element6 = document.CreateElement("data");
                    element6.SetAttribute("name", "sqrq_q");
                    element6.SetAttribute("value", str3);
                    element3.AppendChild(element6);
                    XmlElement element7 = document.CreateElement("data");
                    element7.SetAttribute("name", "sqrq_z");
                    element7.SetAttribute("value", str4);
                    element3.AppendChild(element7);
                    XmlElement element8 = document.CreateElement("data");
                    element8.SetAttribute("name", "xxblx");
                    element8.SetAttribute("value", "0");
                    element3.AppendChild(element8);
                    document.PreserveWhitespace = true;
                    document.Save(this.exePath + @"\Download_HYInputRed.xml");
                    this.progressBar.SetTip("正在连接服务器", "请等待任务完成", "红字货物运输业增值税专用发票信息表下载中");
                    this.progressBar.fpxf_progressBar.Value = 1;
                    this.progressBar.Show();
                    this.progressBar.Refresh();
                    this.ProcessStartThread(0x1b58);
                    this.progressBar.Refresh();
                    int    num  = 0;
                    string str7 = string.Empty;
                    string str8 = string.Empty;
                    string str9 = string.Empty;
                    string xml  = string.Empty;
                    int    num2 = HttpsSender.SendMsg("0011", document.InnerXml, out xml);
                    if (num2 != 0)
                    {
                        MessageManager.ShowMsgBox("INP-431421", new string[] { string.Empty, "下载", Convert.ToString(num2), xml });
                        if (File.Exists(Path.Combine(new string[] { this.exePath + "Download_HYInputRed.xml" })))
                        {
                            File.Delete(Path.Combine(new string[] { this.exePath + "Download_HYInputRed.xml" }));
                        }
                    }
                    else
                    {
                        if (xml != null)
                        {
                            this.progressBar.SetTip("正在下载红字货物运输业增值税专用发票信息表", "请等待任务完成", "红字货物运输业增值税专用发票信息表下载中");
                            XmlDocument document2 = new XmlDocument();
                            document2.LoadXml(xml);
                            document2.Save(this.exePath + @"\Download_HYOutputRed_Feedback.xml");
                            XmlDocument document3 = new XmlDocument();
                            document3.Load(this.exePath + @"\Download_HYOutputRed_Feedback.xml");
                            XmlNode node = document3.SelectSingleNode("//body");
                            int     num3 = Convert.ToInt32(node.Attributes["count"].Value);
                            if (num3 <= 0)
                            {
                                num3 = 1;
                            }
                            foreach (XmlNode node2 in node.ChildNodes)
                            {
                                num++;
                                XmlElement element9 = (XmlElement)node2;
                                string     s        = "";
                                string     str12    = "";
                                foreach (XmlNode node3 in element9.ChildNodes)
                                {
                                    string str16;
                                    if ((node3.Name == "data") && ((str16 = node3.Attributes["name"].Value) != null))
                                    {
                                        if (!(str16 == "xxbmc"))
                                        {
                                            if (str16 == "returnCode")
                                            {
                                                goto Label_0549;
                                            }
                                            if (str16 == "returnMessage")
                                            {
                                                goto Label_0563;
                                            }
                                            if (str16 == "hzxxb")
                                            {
                                                goto Label_057D;
                                            }
                                        }
                                        else
                                        {
                                            str7 = node3.Attributes["value"].Value;
                                        }
                                    }
                                    continue;
Label_0549:
                                    str8 = node3.Attributes["value"].Value;
                                    continue;
Label_0563:
                                    str9 = node3.Attributes["value"].Value;
                                    continue;
Label_057D:
                                    s = node3.Attributes["value"].Value;
                                }
                                if (str8.Equals("00"))
                                {
                                    byte[] buffer = Convert.FromBase64String(s);
                                    if ((buffer != null) && (buffer.Length > 0))
                                    {
                                        str12 = ToolUtil.GetString(buffer);
                                    }
                                    XmlDocument document4 = new XmlDocument();
                                    document4.LoadXml(str12);
                                    document4.Save(this.exePath + @"\Download_HYOutputRed_SqdInfo_" + str7 + ".xml");
                                    XmlDocument document5 = new XmlDocument();
                                    document5.Load(this.exePath + @"\Download_HYOutputRed_SqdInfo_" + str7 + ".xml");
                                    HZFPHY_SQD model = new HZFPHY_SQD {
                                        SQDH  = str7,
                                        XXBZT = str8,
                                        XXBMS = "下载" + str9
                                    };
                                    List <HZFPHY_SQD_MX> models = new List <HZFPHY_SQD_MX>();
                                    string diKou    = string.Empty;
                                    string shenQing = string.Empty;
                                    string liYou    = string.Empty;
                                    foreach (XmlNode node5 in document5.SelectSingleNode("INFO").ChildNodes)
                                    {
                                        if ("BMB_BBH".Equals(node5.Name))
                                        {
                                            model.FLBMBBBH = node5.InnerText;
                                        }
                                        if ("XXBLX".Equals(node5.Name))
                                        {
                                            model.BBBZ = Convert.ToInt32(node5.InnerText);
                                        }
                                        if ("BH".Equals(node5.Name))
                                        {
                                            model.XXBBH = node5.InnerText;
                                        }
                                        if ("TKRQ".Equals(node5.Name))
                                        {
                                            model.TKRQ = Convert.ToDateTime(node5.InnerText);
                                        }
                                        if ("FPLX_DM".Equals(node5.Name))
                                        {
                                            model.FPZL = node5.InnerText.Equals("009") ? "f" : "c";
                                        }
                                        if ("SFJXSEZC".Equals(node5.Name))
                                        {
                                            diKou = node5.InnerText;
                                        }
                                        if ("SQF".Equals(node5.Name))
                                        {
                                            shenQing = node5.InnerText;
                                        }
                                        if ("KJLY".Equals(node5.Name))
                                        {
                                            liYou = node5.InnerText;
                                        }
                                        "YQKJLY".Equals(node5.Name);
                                        if ("KJLYSM".Equals(node5.Name))
                                        {
                                            model.SQLY = node5.InnerText;
                                        }
                                        if ("YFPDM".Equals(node5.Name))
                                        {
                                            model.FPDM = node5.InnerText;
                                        }
                                        if ("YFPHM".Equals(node5.Name))
                                        {
                                            model.FPHM = node5.InnerText;
                                        }
                                        if ("XSFDM".Equals(node5.Name))
                                        {
                                            model.XFSH = node5.InnerText;
                                        }
                                        if ("XSFMC".Equals(node5.Name))
                                        {
                                            model.XFMC = node5.InnerText;
                                        }
                                        if ("GMFDM".Equals(node5.Name))
                                        {
                                            model.GFSH = node5.InnerText;
                                        }
                                        if ("GMFMC".Equals(node5.Name))
                                        {
                                            model.GFMC = node5.InnerText;
                                        }
                                        if ("HJJE".Equals(node5.Name))
                                        {
                                            model.HJJE = Convert.ToDecimal(node5.InnerText);
                                        }
                                        if ("SL".Equals(node5.Name))
                                        {
                                            model.SL = Convert.ToDouble(node5.InnerText);
                                            foreach (HZFPHY_SQD_MX hzfphy_sqd_mx in models)
                                            {
                                                hzfphy_sqd_mx.SE = hzfphy_sqd_mx.JE * Convert.ToDecimal(model.SL);
                                            }
                                        }
                                        if ("SE".Equals(node5.Name))
                                        {
                                            model.HJSE = Convert.ToDecimal(node5.InnerText);
                                        }
                                        if ("SHRSBH".Equals(node5.Name))
                                        {
                                            model.SHFSH = node5.InnerText;
                                        }
                                        if ("SHRMC".Equals(node5.Name))
                                        {
                                            model.SHFMC = node5.InnerText;
                                        }
                                        if ("FHRSBH".Equals(node5.Name))
                                        {
                                            model.FHFSH = node5.InnerText;
                                        }
                                        if ("FHRMC".Equals(node5.Name))
                                        {
                                            model.FHFMC = node5.InnerText;
                                        }
                                        if ("YSHWXX".Equals(node5.Name))
                                        {
                                            model.YSHWXX = node5.InnerText;
                                        }
                                        if ("JQBH".Equals(node5.Name))
                                        {
                                            model.JQBH = node5.InnerText;
                                        }
                                        if ("CZCH".Equals(node5.Name))
                                        {
                                            model.CZCH = node5.InnerText;
                                        }
                                        if ("CCDW".Equals(node5.Name))
                                        {
                                            model.CCDW = node5.InnerText;
                                        }
                                        if ("FYXMJJE".Equals(node5.Name))
                                        {
                                            int        num4     = 0;
                                            XmlElement element1 = (XmlElement)node5;
                                            foreach (XmlNode node6 in node5.ChildNodes)
                                            {
                                                if ("ZB".Equals(node6.Name))
                                                {
                                                    HZFPHY_SQD_MX item = new HZFPHY_SQD_MX {
                                                        SQDH  = model.SQDH,
                                                        MXXH  = num4,
                                                        FPHXZ = 0,
                                                        HSJBZ = false
                                                    };
                                                    XmlElement element10 = (XmlElement)node6;
                                                    foreach (XmlNode node7 in element10.ChildNodes)
                                                    {
                                                        switch (node7.Name)
                                                        {
                                                        case "FYXM":
                                                            item.SPMC = node7.InnerText;
                                                            break;

                                                        case "JE":
                                                            item.JE = Convert.ToDecimal(node7.InnerText);
                                                            item.SE = item.JE * Convert.ToDecimal(model.SL);
                                                            break;

                                                        case "SPBM":
                                                            if (HySqdTianKai.isFLBM)
                                                            {
                                                                item.FLBM = node7.InnerText;
                                                            }
                                                            break;

                                                        case "ZXBM":
                                                            if (HySqdTianKai.isFLBM)
                                                            {
                                                                item.QYSPBM = node7.InnerText;
                                                            }
                                                            break;

                                                        case "YHZCBS":
                                                            if (HySqdTianKai.isFLBM)
                                                            {
                                                                item.SFXSYHZC = node7.InnerText;
                                                            }
                                                            break;

                                                        case "ZZSTSGL":
                                                            if (HySqdTianKai.isFLBM)
                                                            {
                                                                item.YHZCMC = node7.InnerText;
                                                            }
                                                            break;

                                                        case "LSLBS":
                                                            if (HySqdTianKai.isFLBM)
                                                            {
                                                                item.LSLBS = node7.InnerText;
                                                            }
                                                            break;
                                                        }
                                                    }
                                                    models.Add(item);
                                                    num4++;
                                                }
                                            }
                                        }
                                    }
                                    model.SQXZ = this.ParseReasonCode(shenQing, diKou, liYou);
                                    if (shenQing.Trim() == "1")
                                    {
                                        model.REQNSRSBH = model.XFSH;
                                    }
                                    else
                                    {
                                        model.REQNSRSBH = model.GFSH;
                                    }
                                    bool flag = false;
                                    if (this.sqdDal.Select(model.SQDH) != null)
                                    {
                                        flag = this.sqdDal.Updatazt(model);
                                    }
                                    else if (this.sqdDal.Insert(model))
                                    {
                                        this.sqdMxDal.Insert(models);
                                    }
                                    if (File.Exists(Path.Combine(new string[] { this.exePath + "Download_HYOutputRed_SqdInfo_" + str7 + ".xml" })))
                                    {
                                        File.Delete(Path.Combine(new string[] { this.exePath + "Download_HYOutputRed_SqdInfo_" + str7 + ".xml" }));
                                    }
                                }
                                else
                                {
                                    string[]   strArray    = str9.Split(':');
                                    HZFPHY_SQD hzfphy_sqd2 = new HZFPHY_SQD {
                                        SQDH  = str7,
                                        XXBZT = str8
                                    };
                                    if (strArray.Length > 1)
                                    {
                                        hzfphy_sqd2.XXBMS = strArray[1];
                                    }
                                    else
                                    {
                                        hzfphy_sqd2.XXBMS = str9;
                                    }
                                    hzfphy_sqd2.XXBBH = "";
                                    if (this.sqdDal.Select(hzfphy_sqd2.SQDH) != null)
                                    {
                                        this.sqdDal.Updatazt(hzfphy_sqd2);
                                    }
                                }
                                this.ProcessStartThread(0x1388 / num3);
                                this.progressBar.Refresh();
                            }
                            if (File.Exists(Path.Combine(new string[] { this.exePath + "Download_HYOutputRed_Feedback.xml" })))
                            {
                                File.Delete(Path.Combine(new string[] { this.exePath + "Download_HYOutputRed_Feedback.xml" }));
                            }
                        }
                        if (File.Exists(Path.Combine(new string[] { this.exePath + "Download_HYInput.xml" })))
                        {
                            File.Delete(Path.Combine(new string[] { this.exePath + "Download_HYInput.xml" }));
                        }
                        this.progressBar.SetTip("正在下载红字货物运输业增值税专用发票信息表", "请等待任务完成", "红字货物运输业增值税专用发票信息表下载中");
                        this.progressBar.Visible = false;
                        this.BindGridData();
                    }
                }
            }
            catch (Exception exception)
            {
                this.loger.Error("[红字货物运输业增值税专用发票信息表下载]" + exception.Message);
            }
            finally
            {
                if (this.progressBar != null)
                {
                    this.progressBar.Visible = false;
                    this.Refresh();
                }
            }
        }
Пример #25
0
        private void ExecuteDownloadList(List <InvVolumeApp> reqList)
        {
            if (this.HasVehicleVolume(reqList))
            {
                UnlockInvoice invoice = this.TaxCardInstance.NInvGetUnlockInvoice(0x33);
                if (this.TaxCardInstance.get_RetCode() != 0)
                {
                    MessageManager.ShowMsgBox(this.TaxCardInstance.get_ErrCode());
                    return;
                }
                if (!DownloadCommon.CheckEmpty(invoice.Buffer) && (0x33 == invoice.get_Kind()))
                {
                    InvVolumeApp confirmVolumn = new InvVolumeApp {
                        InvType  = Convert.ToByte(invoice.get_Kind()),
                        TypeCode = invoice.get_TypeCode(),
                        HeadCode = Convert.ToUInt32(invoice.get_Number()),
                        Number   = Convert.ToUInt16(invoice.get_Count())
                    };
                    string xml = string.Empty;
                    if (HttpsSender.SendMsg("0020", this.RequestDownloadInput(null, confirmVolumn, Convert.ToBase64String(invoice.Buffer), true), ref xml) != 0)
                    {
                        MessageManager.ShowMsgBox(xml);
                        return;
                    }
                    XmlDocument downInvXml = new XmlDocument();
                    downInvXml.LoadXml(xml);
                    if (this.logFlag)
                    {
                        downInvXml.Save(this.logPath + @"\AllocateRequestDownloadOutput.xml");
                    }
                    this.RequestDownloadOutput(downInvXml);
                }
            }
            int num2 = 0;

            foreach (InvVolumeApp app2 in reqList)
            {
                if (this.buffFull)
                {
                    break;
                }
                num2++;
                if ((!ShareMethods.IsHXInv(app2.InvType) || !this.zpErrTriger) && (!ShareMethods.IsZCInv(app2.InvType) || !this.hjErrTriger))
                {
                    bool          flag;
                    UnlockInvoice invoice2 = new UnlockInvoice();
                    InvVolumeApp  locked   = new InvVolumeApp();
                    InvVolumeApp  tarInv   = app2;
                    invoice2 = this.TaxCardInstance.NInvGetUnlockInvoice(tarInv.InvType);
                    if (this.TaxCardInstance.get_RetCode() != 0)
                    {
                        MessageManager.ShowMsgBox(this.TaxCardInstance.get_ErrCode());
                        break;
                    }
                    bool flag2 = DownloadCommon.CheckEmpty(invoice2.Buffer);
                    if (flag2)
                    {
                        flag = false;
                    }
                    else
                    {
                        locked.InvType  = Convert.ToByte(invoice2.get_Kind());
                        locked.TypeCode = invoice2.get_TypeCode();
                        locked.HeadCode = Convert.ToUInt32(invoice2.get_Number());
                        locked.Number   = Convert.ToUInt16(invoice2.get_Count());
                        flag            = DownloadCommon.CheckRepeat(locked, tarInv);
                    }
                    if (flag)
                    {
                        tarInv = null;
                    }
                    if (flag2)
                    {
                        locked = null;
                    }
                    string str2 = string.Empty;
                    if (HttpsSender.SendMsg("0040", this.RequestDownloadInput(tarInv, locked, Convert.ToBase64String(invoice2.Buffer), true), ref str2) != 0)
                    {
                        MessageManager.ShowMsgBox(str2);
                        break;
                    }
                    XmlDocument document2 = new XmlDocument();
                    document2.LoadXml(str2);
                    if (this.logFlag)
                    {
                        document2.Save(this.logPath + @"\AllocateRequestDownloadOutput.xml");
                    }
                    this.RequestDownloadOutput(document2);
                    if (this.zpErrTriger || this.hjErrTriger)
                    {
                        break;
                    }
                    if (!flag && ((num2 == reqList.Count) || ((num2 != reqList.Count) && !this.CheckOneSystem(reqList[num2 - 1].InvType, reqList[num2].InvType))))
                    {
                        invoice2 = this.TaxCardInstance.NInvGetUnlockInvoice(tarInv.InvType);
                        Convert.ToByte(invoice2.get_Kind());
                        locked = new InvVolumeApp {
                            InvType  = Convert.ToByte(invoice2.get_Kind()),
                            TypeCode = invoice2.get_TypeCode(),
                            HeadCode = Convert.ToUInt32(invoice2.get_Number()),
                            Number   = Convert.ToUInt16(invoice2.get_Count())
                        };
                        if (HttpsSender.SendMsg("0040", this.RequestDownloadInput(null, locked, Convert.ToBase64String(invoice2.Buffer), true), ref str2) != 0)
                        {
                            MessageManager.ShowMsgBox(str2);
                            break;
                        }
                        XmlDocument document3 = new XmlDocument();
                        document3.LoadXml(str2);
                        if (this.logFlag)
                        {
                            document3.Save(this.logPath + @"\AllocateRequestDownloadOutputSingle.xml");
                        }
                        this.RequestDownloadOutput(document3);
                        if (this.zpErrTriger && this.hjErrTriger)
                        {
                            break;
                        }
                    }
                }
            }
        }
Пример #26
0
        private void ExecuteDownloadList(List <InvVolumeApp> reqList)
        {
            int num = 0;

            foreach (InvVolumeApp app in reqList)
            {
                if (this.buffFull || this.webPartialError)
                {
                    break;
                }
                num++;
                if ((!ShareMethods.IsHXInv(app.InvType) || !this.zpErrTriger) && (!ShareMethods.IsZCInv(app.InvType) || !this.hjErrTriger))
                {
                    bool          flag;
                    UnlockInvoice invoice = new UnlockInvoice();
                    InvVolumeApp  locked  = new InvVolumeApp();
                    InvVolumeApp  tarInv  = app;
                    invoice = this.TaxCardInstance.NInvGetUnlockInvoice(tarInv.InvType);
                    if (this.TaxCardInstance.get_RetCode() != 0)
                    {
                        MessageManager.ShowMsgBox(this.TaxCardInstance.get_ErrCode());
                        break;
                    }
                    bool flag2 = DownloadCommon.CheckEmpty(invoice.Buffer);
                    if (flag2)
                    {
                        flag = false;
                    }
                    else
                    {
                        locked.InvType  = Convert.ToByte(invoice.get_Kind());
                        locked.TypeCode = invoice.get_TypeCode();
                        locked.HeadCode = Convert.ToUInt32(invoice.get_Number());
                        locked.Number   = Convert.ToUInt16(invoice.get_Count());
                        flag            = DownloadCommon.CheckRepeat(locked, tarInv);
                    }
                    if (flag)
                    {
                        tarInv = null;
                    }
                    if (flag2)
                    {
                        locked = null;
                    }
                    string xml = string.Empty;
                    if (HttpsSender.SendMsg("0020", this.RequestDownloadInput(tarInv, locked, Convert.ToBase64String(invoice.Buffer), false), ref xml) != 0)
                    {
                        MessageManager.ShowMsgBox(xml);
                        this.webCommunicationError = true;
                        break;
                    }
                    XmlDocument downInvXml = new XmlDocument();
                    downInvXml.LoadXml(xml);
                    if (this.logFlag)
                    {
                        downInvXml.Save(this.logPath + @"\RequestDownloadOutput.xml");
                    }
                    this.RequestDownloadOutput(downInvXml);
                    if (this.zpErrTriger && this.hjErrTriger)
                    {
                        break;
                    }
                    if (!flag && ((num == reqList.Count) || ((num != reqList.Count) && !this.CheckOneSystem(reqList[num - 1].InvType, reqList[num].InvType))))
                    {
                        invoice = this.TaxCardInstance.NInvGetUnlockInvoice(tarInv.InvType);
                        Convert.ToByte(invoice.get_Kind());
                        locked = new InvVolumeApp {
                            InvType  = Convert.ToByte(invoice.get_Kind()),
                            TypeCode = invoice.get_TypeCode(),
                            HeadCode = Convert.ToUInt32(invoice.get_Number()),
                            Number   = Convert.ToUInt16(invoice.get_Count())
                        };
                        if (HttpsSender.SendMsg("0020", this.RequestDownloadInput(null, locked, Convert.ToBase64String(invoice.Buffer), false), ref xml) != 0)
                        {
                            MessageManager.ShowMsgBox(xml);
                            this.webCommunicationError = true;
                            break;
                        }
                        XmlDocument document2 = new XmlDocument();
                        document2.LoadXml(xml);
                        if (this.logFlag)
                        {
                            document2.Save(this.logPath + @"\RequestDownloadOutputSingle.xml");
                        }
                        this.RequestDownloadOutput(document2);
                        if (this.zpErrTriger && this.hjErrTriger)
                        {
                            break;
                        }
                    }
                }
            }
        }
Пример #27
0
 private void btnConfirm_Click(object sender, EventArgs e)
 {
     if (this.confirmList.SelectedRows.Count <= 0)
     {
         MessageManager.ShowMsgBox("INP-441209", new string[] { "待确认" });
     }
     else
     {
         this.confirmList.CurrentCell = this.confirmList.Rows[0].Cells[0];
         this.confirmList.CurrentCell = this.confirmList.Rows[0].Cells[1];
         int    lineNum   = 0;
         string emptyName = string.Empty;
         if (this.contentEmptyCheck(out lineNum, out emptyName))
         {
             MessageManager.ShowMsgBox("INP-4412A9", new string[] { lineNum.ToString(), emptyName });
         }
         else
         {
             XmlDocument document = null;
             bool        flag2    = false;
             if (ApplyCommon.IsHxInvType(this.invType))
             {
                 document = this.CreateHXConfirmInput();
                 if (this.logFlag)
                 {
                     document.Save(this.logPath + "HxConfirmInput.xml");
                 }
                 string xml = string.Empty;
                 if (HttpsSender.SendMsg("0038", document.InnerXml, ref xml) != 0)
                 {
                     MessageManager.ShowMsgBox(xml);
                     return;
                 }
                 XmlDocument docFeedback = new XmlDocument();
                 docFeedback.LoadXml(xml);
                 if (this.logFlag)
                 {
                     docFeedback.Save(this.logPath + @"\HxConfirmOutput.xml");
                 }
                 string msg   = string.Empty;
                 bool   flag3 = this.ParseHXConfirmOutput(docFeedback, out msg);
                 flag2 = flag3;
                 if (!flag3)
                 {
                     MessageManager.ShowMsgBox(msg);
                     return;
                 }
             }
             else if (ApplyCommon.IsZcInvType(this.invType))
             {
                 document = this.CreateZCConfirmInput();
                 if (this.logFlag)
                 {
                     document.Save(this.logPath + "ZcConfirmInput.xml");
                 }
                 string str4 = string.Empty;
                 if (HttpsSender.SendMsg("0039", document.InnerXml, ref str4) != 0)
                 {
                     MessageManager.ShowMsgBox(str4);
                     return;
                 }
                 XmlDocument document3 = new XmlDocument();
                 document3.LoadXml(str4);
                 if (this.logFlag)
                 {
                     document3.Save(this.logPath + @"\ZcConfirmOutput.xml");
                 }
                 string str5  = string.Empty;
                 bool   flag4 = this.ParseZCConfirmOutput(document3, out str5);
                 flag2 = flag4;
                 if (!flag4)
                 {
                     MessageManager.ShowMsgBox(str5);
                     return;
                 }
             }
             if (flag2)
             {
                 base.DialogResult = DialogResult.Yes;
             }
             else
             {
                 base.DialogResult = DialogResult.No;
             }
             base.Close();
         }
     }
 }
Пример #28
0
        public void method_1(string string_0)
        {
            try
            {
                Class84 class2 = new Class84();
                class2.method_40(string_0);
                Class87.list_1.Clear();
                DataTable table = new DataTable();
                table.Columns.Add("FPSLH", typeof(string));
                DataRow row = table.NewRow();
                row["FPSLH"] = string_0;
                table.Rows.Add(row);
                table.AcceptChanges();
                this.list_0.Clear();
                this.list_0 = this.class84_0.method_5(table);
                XmlDocument document = new XmlDocument();
                string      str      = "";
                int         num4     = (this.list_0.Count > 5) ? 5 : this.list_0.Count;
                for (int i = 0; i < num4; i++)
                {
                    Class103.smethod_0(this.list_0[i], "DownMethodToServer" + i);
                    string str2 = this.class84_0.method_28(this.list_0[i]);
                    Class101.smethod_0("(发票下载)通过受理序列号得到的票种为:" + str2);
                    if (!str2.Equals("q") && !str2.Equals("JSFP"))
                    {
                        if (HttpsSender.SendMsg("0004", this.list_0[i].InnerXml.ToString(), out str) == 0)
                        {
                            goto Label_023F;
                        }
                        Class87.bool_1 = false;
                        int index = str.IndexOf("[");
                        int num   = str.IndexOf("]");
                        if ((index > -1) && (num > index))
                        {
                            Class87.string_3 = str.Substring(index + 1, num - 1);
                        }
                        if (num > 0)
                        {
                            Class87.string_2 = str.Substring(num + 1);
                        }
                        else
                        {
                            Class87.string_2 = str;
                        }
                        Class87.xmlDocument_1 = class2.method_26(1);
                        class2.method_22(this.list_0[i], str, 3);
                        continue;
                    }
                    Class101.smethod_0("(发票下载)开始卷票上传,原文:" + this.list_0[i].InnerXml);
                    if (HttpsSender.SendMsg("0030", this.list_0[i].InnerXml.ToString(), out str) != 0)
                    {
                        class2.method_22(this.list_0[i], str, 3);
                        Class101.smethod_1("(下载线程)发票下载失败!            " + str);
                        continue;
                    }
Label_023F:
                    Class87.bool_1 = true;
                    document.LoadXml(str);
                    if (Class87.bool_2)
                    {
                        XmlDocument document2 = new XmlDocument();
                        document2.LoadXml(document.InnerXml);
                        Class101.smethod_0("发票下载-批量接口:局端返回报文处理前:" + document2.InnerXml);
                        Class87.xmlDocument_1 = this.class84_0.method_25(document2);
                        Class101.smethod_0("发票下载-批量接口:局端返回报文处理后:" + document2.InnerXml);
                    }
                    Class103.smethod_0(document, "DownMethodFromServer" + i);
                    Class101.smethod_0("开始调用AnalyzeDownMethodXmlDoc-Single");
                    this.class84_0.method_9(document, this.list_0[i]);
                }
                Class88.smethod_1();
                Class88.smethod_4();
            }
            catch (Exception exception)
            {
                Class101.smethod_1("DownLoadBySingle异常:" + exception.ToString());
            }
        }
Пример #29
0
 public void method_0()
 {
     try
     {
         string location = Assembly.GetExecutingAssembly().Location;
         this.string_1 = location.Substring(0, location.LastIndexOf(@"\")) + @"\" + AttributeName.QYXXFileName;
         XmlDocument document = new XmlDocument();
         if (!Class87.bool_3)
         {
             if (File.Exists(this.string_1))
             {
                 Class101.smethod_0("更新企业参数同步数据:数据文件已存在。");
                 document.Load(this.string_1);
                 Class101.smethod_0("更新企业参数同步数据:!    " + document.InnerXml);
                 if (string.IsNullOrEmpty(document.InnerXml))
                 {
                     if (Class87.bool_3)
                     {
                         Class87.dictionary_0["UpdateBZ"] = "1";
                         Class87.dictionary_0["Message"]  = "服务器端异常,返回信息为空";
                     }
                     return;
                 }
                 this.class84_0.method_18(document);
                 if (File.Exists(this.string_1))
                 {
                     File.Delete(this.string_1);
                 }
                 MessageHelper.MsgWait();
                 Class86.smethod_9();
             }
             document      = this.class84_0.method_16();
             this.string_0 = document.InnerXml;
             ThreadStart start = new ThreadStart(this.method_1);
             new Thread(start).Start();
         }
         else
         {
             document = this.class84_0.method_16();
             if (document != null)
             {
                 Class103.smethod_0(document, "OptionToServer");
                 string str2 = "";
                 Class101.smethod_0("开始企业信息上传,【企业参数同步】上传报文:" + document.InnerXml);
                 if (HttpsSender.SendMsg("0001", document.InnerXml.ToString(), out str2) != 0)
                 {
                     Class101.smethod_1("企业信息上传失败!    " + str2.ToString());
                     Class95.bool_0   = false;
                     Class95.string_0 = "企业参数更新失败:" + str2;
                     Class95.bool_1   = false;
                     Class95.string_1 = Class95.string_2 + "同步失败:" + str2;
                     if (Class87.bool_3)
                     {
                         Class87.dictionary_0["UpdateBZ"] = "0";
                         Class87.dictionary_0["Message"]  = str2;
                     }
                 }
                 else
                 {
                     Class101.smethod_0("企业参数同步,局端返回数据:!    " + str2.ToString());
                     if (string.IsNullOrEmpty(str2))
                     {
                         if (Class87.bool_3)
                         {
                             Class87.dictionary_0["UpdateBZ"] = "1";
                             Class87.dictionary_0["Message"]  = "服务器端异常,返回信息为空";
                         }
                     }
                     else
                     {
                         XmlDocument document2 = new XmlDocument();
                         document2.LoadXml(str2);
                         Class103.smethod_0(document2, "OptionFromServer");
                         this.class84_0.method_18(document2);
                         MessageHelper.MsgWait();
                         Class86.smethod_9();
                     }
                 }
             }
         }
     }
     catch (Exception exception)
     {
         Class101.smethod_1("更新企业参数信息失败!" + exception.ToString());
     }
 }
Пример #30
0
        private void method_0(bool bool_2, bool bool_3, string string_0, string string_1, string string_2, string string_3)
        {
            try
            {
                XmlDocument       document = new XmlDocument();
                UpdateTransMethod wBS      = UpdateTransMethod.WBS;
                string            str      = string.Empty;
                this.dateTime_0 = DateTime.Now;
                this.bool_0     = false;
                Class87.list_0.Clear();
                if (bool_3)
                {
                    this.int_0 = this.method_5(UpdateTransMethod.BSZ);
                    wBS        = UpdateTransMethod.BSZ;
                }
                else if (this.int_0 < 1)
                {
                    this.int_0 = this.method_5(UpdateTransMethod.WBS);
                    wBS        = UpdateTransMethod.WBS;
                }
                if (Class87.bool_3)
                {
                    this.int_0 = 1;
                }
                else
                {
                    if (this.int_0 < 1)
                    {
                        this.int_1  = 0;
                        this.int_2  = 0;
                        this.bool_0 = true;
                        Class101.smethod_0("发票上传:没有需要上传的发票");
                        return;
                    }
                    if (bool_3)
                    {
                        this.bool_0 = true;
                    }
                    else
                    {
                        this.bool_0 = false;
                    }
                }
                if (Class87.bool_3)
                {
                    this.int_1 = 1;
                    this.int_2 = this.int_0 + 1;
                }
                else if ((!bool_2 && !bool_3) && !FormMain.bContinuUpload)
                {
                    this.int_1++;
                    this.int_2 = this.int_1 + 1;
                }
                else
                {
                    this.int_1 = 1;
                    this.int_2 = this.int_0 + 1;
                }
                if (((!string.IsNullOrEmpty(string_1) && !string.IsNullOrEmpty(string_0)) && !string.IsNullOrEmpty(string_2)) || !string.IsNullOrEmpty(string_3))
                {
                    this.int_1 = 1;
                    this.int_2 = 2;
                    wBS        = UpdateTransMethod.BszAndWbs;
                }
                bool flag = false;
                int  num  = this.int_1;
                while (true)
                {
                    if (num >= this.int_2)
                    {
                        break;
                    }
                    this.list_0.Clear();
                    this.list_1.Clear();
                    this.list_2.Clear();
                    this.list_3.Clear();
                    this.list_4.Clear();
                    Class101.smethod_1("(上传线程)开始获取待上传的发票信息");
                    if (!this.class84_0.method_3(ref this.list_0, ref this.list_1, ref this.list_2, ref this.list_3, ref this.list_4, num, wBS, string_1, string_0, string_2, string_3))
                    {
                        Class101.smethod_1("(上传线程)没有需要上传的发票信息");
                        this.bool_0 = true;
                        this.int_0  = 0;
                        this.int_1  = 0;
                        this.int_2  = 0;
                    }
                    else
                    {
                        Class101.smethod_1("(上传线程)获取待上传的发票信息结束");
                        try
                        {
                            str = string.Empty;
                            for (int i = 0; i < this.list_0.Count; i++)
                            {
                                if (!bool_2 && (Class97.dataTable_0.Rows.Count >= Class87.int_0))
                                {
                                    goto Label_0398;
                                }
                                Class103.smethod_0(this.list_0[i], "UpMethodZPToServer" + i);
                                Class101.smethod_1("(上传线程)开始专普发票上传");
                                if (HttpsSender.SendMsg("0003", this.list_0[i].InnerXml.ToString(), out str) != 0)
                                {
                                    Class101.smethod_1("(上传线程)专普发票上传失败!             " + str.ToString());
                                    Class87.bool_0 = false;
                                    int index = str.IndexOf("[");
                                    int num3  = str.IndexOf("]");
                                    if ((index > -1) && (num3 > index))
                                    {
                                        Class87.string_0 = str.Substring(index + 1, num3 - 1);
                                    }
                                    if (num3 > 0)
                                    {
                                        Class87.string_1 = str.Substring(num3 + 1);
                                    }
                                    else
                                    {
                                        Class87.string_1 = str;
                                    }
                                    this.class84_0.method_19(this.list_0[i], "执行发票上传失败,原因:" + str, 0);
                                    this.bool_0 = this.bool_0;
                                }
                                else
                                {
                                    Class101.smethod_1("(上传线程)开始解析专普发票上传结果。");
                                    if (!string.IsNullOrEmpty(str))
                                    {
                                        document.LoadXml(str);
                                        Class103.smethod_0(document, "UpMethodZPFromServer" + i);
                                        if (this.class100_0.method_6(document, this.list_0[i]))
                                        {
                                            Class87.bool_0 = true;
                                            this.bool_0    = true;
                                            flag           = true;
                                            Class101.smethod_0("(上传线程)专普发票上传结束!");
                                        }
                                    }
                                }
                            }
                            goto Label_03A6;
Label_0398:
                            this.int_1 = 0;
                            this.int_2 = 0;
Label_03A6:
                            this.list_0.Clear();
                        }
                        catch (Exception exception)
                        {
                            Class101.smethod_1("(上传线程)专普发票上传失败!" + exception.ToString());
                        }
                        try
                        {
                            str = string.Empty;
                            for (int j = 0; j < this.list_1.Count; j++)
                            {
                                if (!bool_2 && (Class97.dataTable_0.Rows.Count >= Class87.int_0))
                                {
                                    goto Label_0575;
                                }
                                Class103.smethod_0(this.list_1[j], "UpMethodHYTOServer" + j);
                                Class101.smethod_1("(上传线程)开始上传货运发票!");
                                if (HttpsSender.SendMsg("0005", this.list_1[j].InnerXml.ToString(), out str) != 0)
                                {
                                    Class101.smethod_1("(上传线程)货运发票上传失败!        " + str.ToString());
                                    Class87.bool_0 = false;
                                    int num6 = str.IndexOf("[");
                                    int num7 = str.IndexOf("]");
                                    if ((num6 > -1) && (num7 > num6))
                                    {
                                        Class87.string_0 = str.Substring(num6 + 1, num7 - 1);
                                    }
                                    if (num7 > 0)
                                    {
                                        Class87.string_1 = str.Substring(num7 + 1);
                                    }
                                    else
                                    {
                                        Class87.string_1 = str;
                                    }
                                    this.class84_0.method_21(this.list_1[j], "f", "执行发票上传失败,原因:" + str, 0);
                                    this.bool_0 = this.bool_0;
                                }
                                else
                                {
                                    Class101.smethod_1("<上传线程>开始解析货运发票上传结果。");
                                    if (!string.IsNullOrEmpty(str))
                                    {
                                        document.LoadXml(str);
                                        Class103.smethod_0(document, "UpMethodHYFromServer" + j);
                                        if (this.class100_0.method_8(document, this.list_1[j], "f"))
                                        {
                                            this.bool_0    = true;
                                            Class87.bool_0 = true;
                                            flag           = true;
                                            Class101.smethod_0("(上传线程)货运发票上传结束!");
                                        }
                                    }
                                }
                            }
                            goto Label_0583;
Label_0575:
                            this.int_1 = 0;
                            this.int_2 = 0;
Label_0583:
                            this.list_1.Clear();
                        }
                        catch (Exception exception2)
                        {
                            Class101.smethod_1("(上传线程)货运发票上传失败!" + exception2.ToString());
                        }
                        try
                        {
                            for (int k = 0; k < this.list_2.Count; k++)
                            {
                                if (!bool_2 && (Class97.dataTable_0.Rows.Count >= Class87.int_0))
                                {
                                    goto Label_0752;
                                }
                                str = string.Empty;
                                Class103.smethod_0(this.list_2[k], "UpMethodJDCTOServer" + k);
                                Class101.smethod_1("(上传线程)开始上传机动车发票!");
                                if (HttpsSender.SendMsg("0005", this.list_2[k].InnerXml.ToString(), out str) != 0)
                                {
                                    Class101.smethod_1("(上传线程)机动车发票上传失败!        " + str.ToString());
                                    Class87.bool_0 = false;
                                    int num10 = str.IndexOf("[");
                                    int num9  = str.IndexOf("]");
                                    if ((num10 > -1) && (num9 > num10))
                                    {
                                        Class87.string_0 = str.Substring(num10 + 1, num9 - 1);
                                    }
                                    if (num9 > 0)
                                    {
                                        Class87.string_1 = str.Substring(num9 + 1);
                                    }
                                    else
                                    {
                                        Class87.string_1 = str;
                                    }
                                    this.class84_0.method_21(this.list_2[k], "j", "执行发票上传失败,原因:" + str, 0);
                                    this.bool_0 = this.bool_0;
                                }
                                else
                                {
                                    Class101.smethod_1("(上传线程)开始解析机动车发票上传结果。");
                                    if (!string.IsNullOrEmpty(str))
                                    {
                                        document.LoadXml(str);
                                        Class103.smethod_0(document, "UpMethodJDCFromServer" + k);
                                        if (this.class100_0.method_8(document, this.list_2[k], "j"))
                                        {
                                            Class87.bool_0 = true;
                                            this.bool_0    = true;
                                            flag           = true;
                                            Class101.smethod_0("(上传线程)机动车发票上传结束!");
                                        }
                                    }
                                }
                            }
                            goto Label_0760;
Label_0752:
                            this.int_1 = 0;
                            this.int_2 = 0;
Label_0760:
                            this.list_2.Clear();
                        }
                        catch (Exception exception3)
                        {
                            Class101.smethod_1("(上传线程)机动车发票上传失败!   " + exception3.ToString());
                        }
                        try
                        {
                            str = string.Empty;
                            for (int m = 0; m < this.list_3.Count; m++)
                            {
                                if (!bool_2 && (Class97.dataTable_0.Rows.Count >= Class87.int_0))
                                {
                                    goto Label_0925;
                                }
                                Class103.smethod_0(this.list_3[m], "UpMethodZPToServer" + m);
                                Class101.smethod_1("(上传线程)开始电子发票上传");
                                if (HttpsSender.SendMsg("0031", this.list_3[m].InnerXml.ToString(), out str) != 0)
                                {
                                    Class101.smethod_1("(上传线程)电子发票上传失败!             " + str.ToString());
                                    Class87.bool_0 = false;
                                    int num13 = str.IndexOf("[");
                                    int num12 = str.IndexOf("]");
                                    if ((num13 > -1) && (num12 > num13))
                                    {
                                        Class87.string_0 = str.Substring(num13 + 1, num12 - 1);
                                    }
                                    if (num12 > 0)
                                    {
                                        Class87.string_1 = str.Substring(num12 + 1);
                                    }
                                    else
                                    {
                                        Class87.string_1 = str;
                                    }
                                    this.class84_0.method_19(this.list_3[m], "执行发票上传失败,原因:" + str, 0);
                                    this.bool_0 = this.bool_0;
                                }
                                else
                                {
                                    Class101.smethod_1("(上传线程)开始解析电子发票上传结果。");
                                    if (!string.IsNullOrEmpty(str))
                                    {
                                        document.LoadXml(str);
                                        Class103.smethod_0(document, "UpMethodZPFromServer" + m);
                                        if (this.class100_0.method_6(document, this.list_3[m]))
                                        {
                                            Class87.bool_0 = true;
                                            flag           = true;
                                            this.bool_0    = true;
                                            Class101.smethod_0("(上传线程)电子发票上传结束!");
                                        }
                                    }
                                }
                            }
                            goto Label_0933;
Label_0925:
                            this.int_1 = 0;
                            this.int_2 = 0;
Label_0933:
                            this.list_3.Clear();
                        }
                        catch (Exception exception4)
                        {
                            Class101.smethod_1("(上传线程)电子发票上传失败!" + exception4.ToString());
                        }
                        try
                        {
                            str = string.Empty;
                            for (int n = 0; n < this.list_4.Count; n++)
                            {
                                if (!bool_2 && (Class97.dataTable_0.Rows.Count >= Class87.int_0))
                                {
                                    goto Label_0B08;
                                }
                                Class103.smethod_0(this.list_4[n], "UpMethodJSFPToServer" + n);
                                Class101.smethod_1("(上传线程)开始卷式发票上传");
                                if (HttpsSender.SendMsg("0029", this.list_4[n].InnerXml.ToString(), out str) != 0)
                                {
                                    Class101.smethod_1("(上传线程)卷式发票上传失败!             " + str.ToString());
                                    Class87.bool_0 = false;
                                    int num16 = str.IndexOf("[");
                                    int num15 = str.IndexOf("]");
                                    if ((num16 > -1) && (num15 > num16))
                                    {
                                        Class87.string_0 = str.Substring(num16 + 1, num15 - 1);
                                    }
                                    if (num15 > 0)
                                    {
                                        Class87.string_1 = str.Substring(num15 + 1);
                                    }
                                    else
                                    {
                                        Class87.string_1 = str;
                                    }
                                    this.class84_0.method_20(this.list_4[n], "执行发票上传失败,原因:" + str, 0);
                                    this.bool_0 = this.bool_0;
                                }
                                else
                                {
                                    Class101.smethod_1("(上传线程)开始解析卷式发票上传结果。");
                                    Class101.smethod_0("(上传线程)上传卷票返回:" + str);
                                    if (!string.IsNullOrEmpty(str))
                                    {
                                        document.LoadXml(str);
                                        Class103.smethod_0(document, "UpMethodZPFromServer" + n);
                                        if (this.class100_0.method_7(document, this.list_4[n]))
                                        {
                                            Class87.bool_0 = true;
                                            flag           = true;
                                            this.bool_0    = true;
                                            Class101.smethod_0("(上传线程)卷式发票上传结束!");
                                        }
                                    }
                                }
                            }
                            goto Label_0B16;
Label_0B08:
                            this.int_1 = 0;
                            this.int_2 = 0;
Label_0B16:
                            this.list_4.Clear();
                        }
                        catch (Exception exception5)
                        {
                            Class101.smethod_1("(上传线程)卷式发票上传失败!" + exception5.ToString());
                        }
                    }
                    num++;
                }
                Class88.smethod_0();
                if (Class87.bool_2)
                {
                    this.class81_0.method_15();
                }
                Class88.smethod_3();
                if ((this.int_2 > this.int_0) && (this.int_0 != 1))
                {
                    this.int_1  = 0;
                    this.int_2  = 0;
                    this.int_0  = 0;
                    this.bool_0 = true;
                }
                if ((!string.IsNullOrEmpty(string_1) && !string.IsNullOrEmpty(string_0)) && (!string.IsNullOrEmpty(string_2) && !flag))
                {
                    Class96 class2 = this.class100_0.method_3(Class97.dataTable_0, string_0, string_1);
                    if ((class2 != null) && !string.IsNullOrEmpty(class2.FPSLH))
                    {
                        Class87.bool_0   = true;
                        Class87.string_0 = "0000";
                        Class87.string_1 = class2.FPSLH;
                    }
                    else
                    {
                        Class87.bool_0   = false;
                        Class87.string_0 = "-0007";
                        Class87.string_1 = "上传失败,未查询到受理序列号!";
                    }
                }
            }
            catch (Exception exception6)
            {
                Class101.smethod_1("<上传线程>发票上传异常:" + exception6.ToString());
            }
            finally
            {
                this.list_0.Clear();
                this.list_1.Clear();
                this.list_2.Clear();
                this.list_3.Clear();
                this.list_4.Clear();
            }
        }