public static void DealWith602(XElement xElement, string path) { ReceiptSql sqlserver = null; MessageService msService = null; try { IEnumerable <XElement> eles = xElement.Elements().First().Elements(); string guid = eles.Where(e => e.Name.LocalName == "guid").First().Value; string copNo = eles.Where(e => e.Name.LocalName == "copNo").First().Value; string preNo = null; 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; switch (status) { case "-9999": preNo = ""; break; case "800": preNo = eles.Where(e => e.Name.LocalName == "preNo").First().Value; if (ConfigurationInfo.Need501) { MessageControl msControl = new MessageControl(); msControl.CreateMessage503L(copNo); } break; default: preNo = eles.Where(e => e.Name.LocalName == "preNo").First().Value; break; } sqlserver = new ReceiptSql(); sqlserver.Operate602(copNo, preNo, status); string destPath = FileUtilities.GetNewFolderName(true, ConfigurationInfo.PathBackUp, "602") + "\\" + FileUtilities.GetNewFileName(copNo, status) + ".xml"; msService = new MessageService(); msService.DealMessage602(copNo, guid, status, returnTime, returnInfo, destPath); FileUtilities.FileMove(path, destPath); } catch (Exception ex) { BackUpForError(path); Logs.Error("DealWith602 Exception: " + ex.ToString()); } }
public bool CreateMessage503L(string orderNoFake) { MessageControl msControl = new MessageControl(); return(msControl.CreateMessage503L(orderNoFake)); }