Exemplo n.º 1
0
        public static void DealWith504(XElement xElement, string path)
        {
            MessageService msService = null;

            try
            {
                IEnumerable <XElement> eles = xElement.Elements().First().Elements();
                string guid            = eles.Where(e => e.Name.LocalName == "guid").First().Value;
                string logisticsNo     = eles.Where(e => e.Name.LocalName == "logisticsNo").First().Value;
                string status          = eles.Where(e => e.Name.LocalName == "returnStatus").First().Value;
                string returnTime      = eles.Where(e => e.Name.LocalName == "returnTime").First().Value;
                string returnInfo      = eles.Where(e => e.Name.LocalName == "returnInfo").First().Value;
                string logisticsStatus = eles.Where(e => e.Name.LocalName == "logisticsStatus").First().Value;
                if (logisticsStatus.Equals("R", StringComparison.CurrentCultureIgnoreCase) && status.Equals("120"))
                {
                    MessageCache601.RemoveCache(logisticsNo);
                    MessageControl control = new MessageControl();
                    control.CreateMessage601(logisticsNo);
                }

                string destPath = FileUtilities.GetNewFolderName(true, ConfigurationInfo.PathBackUp, "504") + "\\" + FileUtilities.GetNewFileName(logisticsNo, status, logisticsStatus) + ".xml";

                msService = new MessageService();
                msService.DealMessage504(logisticsNo, guid, status, logisticsStatus, returnTime, returnInfo, destPath);

                FileUtilities.FileMove(path, destPath);
            }
            catch (Exception ex)
            {
                Logs.Error("DealWith503 Exception: " + ex.ToString());
            }
        }
        public bool CreateMessage601(string logisticsNo)
        {
            MessageControl msControl = new MessageControl();

            return(msControl.CreateMessage601(logisticsNo));
        }