Esempio n. 1
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();
     }
 }
Esempio n. 2
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();
 }