Beispiel #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="p_refSubmitID"></param>
        /// <returns></returns>
        public bool DoRequestSubmit(string p_refSubmitID)
        {
            IReporter.WriteDebug(p_refSubmitID);

            var _result = true;

            var _requestDate = DateTime.Now;

            {
                MimeContent _mimeContent = DoSendRequest(p_refSubmitID, _requestDate);
                if (_mimeContent.StatusCode == 0)
                {
                    var _xmldoc = new XmlDocument();
                    _xmldoc.LoadXml(_mimeContent.Parts[1].GetContentAsString());

                    string _message;

                    _result = Responsor.DoSaveRequestAck(_xmldoc, _requestDate, out _message);
                    if (LogCommands == true || _result == false)
                    {
                        ELogger.SNG.WriteLog("X", _message);
                    }
                }
            }

            return(_result);
        }
Beispiel #2
0
        //-------------------------------------------------------------------------------------------------------------------------
        //
        //-------------------------------------------------------------------------------------------------------------------------

        /// <summary>
        /// 국세청으로 부터 전달 받은 메시지를 DB에 UPDATE 합니다.
        /// </summary>
        /// <param name="p_xmldoc"></param>
        /// <param name="p_reponse_date"></param>
        public void ResultDataProcess(XmlDocument p_xmldoc, DateTime p_reponse_date)
        {
            IResponsor.WriteDebug(p_xmldoc.Name);

            string _message;

            bool _result = Responsor.DoSaveRequestAck(p_xmldoc, p_reponse_date, out _message);

            if (LogCommands == true || _result == false)
            {
                ELogger.SNG.WriteLog("X", _message);
            }

            if (_result == false)
            {
                var _directory = Path.Combine(UAppHelper.NTSFolder, p_reponse_date.ToString("yyyyMM"));

                if (Directory.Exists(_directory) == false)
                {
                    Directory.CreateDirectory(_directory);
                }

                var _savefile = Path.Combine(_directory, $"response_{p_reponse_date.ToString("yyyyMMddHHmmss")}.xml");
                File.WriteAllText(_savefile, p_xmldoc.OuterXml, Encoding.UTF8);
            }
        }