Exemplo n.º 1
0
        public bool method_1(List <string> sqlID, List <Dictionary <string, object> > param, bool bool_0)
        {
            bool flag = false;

            if (((sqlID != null) && (sqlID.Count >= 1)) && ((param != null) && (param.Count >= 1)))
            {
                try
                {
                    int num = this.ibaseDAO_0.未确认DAO方法1(sqlID.ToArray(), param);
                    if (num > 0)
                    {
                        flag = true;
                    }
                    if (!bool_0 && (num > 0))
                    {
                        MessageHelper.MsgWait();
                        Class86.smethod_8(Class95.string_2 + "更新成功,请及时维护" + Class95.string_2 + "库。");
                        Class95.bool_1   = true;
                        Class95.string_1 = Class95.string_2 + "更新成功,请及时维护" + Class95.string_2 + "库。";
                        return(flag);
                    }
                    if (!bool_0 && (num <= 0))
                    {
                        MessageHelper.MsgWait();
                        Class86.smethod_7(Class95.string_2 + "更新失败,请选择手动更新或去税局下载更新包导入更新。");
                        Class95.bool_1   = true;
                        Class95.string_1 = Class95.string_2 + "更新失败,请选择手动更新或去税局下载更新包导入更新。";
                        return(flag);
                    }
                    if (num <= 0)
                    {
                        Class95.bool_1   = true;
                        Class95.string_1 = Class95.string_2 + "更新失败,请选择手动更新或去税局下载更新包导入更新。";
                        return(flag);
                    }
                    Class95.bool_1   = true;
                    Class95.string_1 = Class95.string_2 + "更新成功,请及时维护" + Class95.string_2 + "库。";
                }
                catch (Exception exception)
                {
                    Class101.smethod_1("UpdateSPFLTable异常:" + exception.ToString());
                    if (!bool_0)
                    {
                        MessageHelper.MsgWait();
                        Class86.smethod_7(Class95.string_2 + "更新失败,请选择手动更新或去税局下载更新包导入更新:" + exception.Message);
                    }
                    Class95.bool_1   = true;
                    Class95.string_1 = Class95.string_2 + "更新失败,请选择手动更新或去税局下载更新包导入更新:" + exception.Message;
                }
                return(flag);
            }
            Class101.smethod_0("sqlid为空或者param为空");
            return(flag);
        }
Exemplo n.º 2
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());
     }
 }
Exemplo n.º 3
0
        public int method_9(string string_0, string string_1, string string_2)
        {
            int    num = 0;
            string str = "";

            if (string_2.Equals("ZYFP", StringComparison.CurrentCultureIgnoreCase))
            {
                str = "s";
            }
            else if (string_2.Equals("PTFP", StringComparison.CurrentCultureIgnoreCase))
            {
                str = "c";
            }
            else if (string_2.Equals("HYFP", StringComparison.CurrentCultureIgnoreCase))
            {
                str = "f";
            }
            else if (string_2.Equals("JDCFP", StringComparison.CurrentCultureIgnoreCase))
            {
                str = "j";
            }
            else if (string_2.Equals("DZFP", StringComparison.CurrentCultureIgnoreCase))
            {
                str = "p";
            }
            else if (string_2.Equals("JSFP", StringComparison.CurrentCultureIgnoreCase))
            {
                str = "q";
            }
            else
            {
                str = string_2;
            }
            int result = 0;

            int.TryParse(string_0, out result);
            Dictionary <string, object> parameter = new Dictionary <string, object>();

            parameter.Add("FPHM", result);
            parameter.Add("FPDM", string_1);
            parameter.Add("FPZL", str);
            parameter.Add("BSCS", "0");
            TaxCard card = TaxCard.CreateInstance(CTaxCardType.const_7);

            try
            {
                Dictionary <int, int> dictionary2 = this.method_10();
                int num3 = Convert.ToInt32(card.GetCardClock().ToString("yyyyMM"));
                int num4 = Convert.ToInt32(this.ibaseDAO_0.queryValueSQL <int>("Aisino.Framework.MainForm.UpDown.GetSSYF", parameter));
                int num5 = Convert.ToInt32(this.ibaseDAO_0.queryValueSQL <int>("Aisino.Framework.MainForm.UpDown.GetBSQ", parameter));
                Class101.smethod_0(string.Concat(new object[] { "发票延签作废:fpdm:", string_1, "  fphm:", string_0, "   fpzl:", str, "  _ssyf:", num4, "  _JSPYearAndMonth:", num3, "    _BSQ:", num5, "   _dictCurrentPeriod[(int)FPLX.DZFP]:", dictionary2[0x33] }));
                if ((num4 == num3) && (num5 == dictionary2[0x33]))
                {
                    Class101.smethod_0("延签作废:1");
                    parameter.Add("BSRZ", "【" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "】验签失败,系统已自动作废该发票,稍后系统会重新上传该张发票!");
                    num = this.ibaseDAO_0.queryValueSQL <int>("Aisino.Framework.MainForm.UpDown.SetBSCSAndBSRZ", parameter);
                    object[] objArray2 = ServiceFactory.InvokePubService("Aisino.Fwkp.Fpkj.FPYiKaiZuoFeiWenBenJieKouShareMethods", new object[] { "p", string_1, string_0, 3 });
                    if (Class87.bool_2)
                    {
                        Class87.string_3 = "-0009";
                        Class87.string_2 = "验签失败,系统已自动作废该发票,稍后系统会重新上传该张发票!";
                        return(num);
                    }
                    if ((objArray2 != null) && ((bool)objArray2[0]))
                    {
                        Class101.smethod_0("电子发票延签失败自动作废成功:fpdm:" + string_1 + "  fphm:" + string_1);
                        new Class84().method_29(string_1, string_0);
                        Class86.smethod_4(string_1, string_0);
                        return(num);
                    }
                    Class101.smethod_0("电子发票延签失败无法自动作废:fpdm:" + string_1 + "  fphm:" + string_1);
                    Class86.smethod_5(string_1, string_0);
                    return(num);
                }
                Class101.smethod_0("延签作废:2");
                parameter.Add("BSRZ", "【" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "】验签失败,该发票已跨月或者已抄税,系统无法作废该发票,请开红票冲销该张发票!");
                num = this.ibaseDAO_0.queryValueSQL <int>("Aisino.Framework.MainForm.UpDown.SetBSCSAndBSRZ", parameter);
                if (Class87.bool_2)
                {
                    Class87.string_3 = "-0008";
                    Class87.string_2 = "验签失败,该发票已跨月或者已抄税,系统无法作废该发票,请开红票冲销该张发票!";
                    return(num);
                }
                Class101.smethod_0("延签作废:3");
                Class86.smethod_5(string_1, string_0);
            }
            catch (Exception exception)
            {
                Class101.smethod_1("(下载线程)设置报送次数失败!" + exception.ToString());
            }
            return(num);
        }