public static bool CheckSfc(Sfc cs, out string msg) { string xml = GetXML("Sfc", new string[] { "BarcodeNo=" + cs.BarcodeNo, "ProcessCode=" + cs.ProcessCode, "StationCode=" + cs.StationCode, "OrderNo=" + cs.OrderNo, "IPAddress=" + cs.IPAddress, "MaterialOrderNo=" + cs.MaterialOrderNo, "MachineNo=" + cs.MachineNo, "UserNumber=" + cs.UserNumber }); ServiceAPI ws = new ServiceAPI(); #if ISOFFLINE string returnXml = @"<?xml version='1.0' encoding='utf-8'?> <response> <table> <rows> <returncode>1</returncode> <errormsg>OK</errormsg> </rows> </table> </response>"; #else string returnXml = string.Empty; try { returnXml = ws.Check_SFC(xml); } catch (Exception ex) { msg = ex.Message; return(false); } #endif bool b = CheckXML(returnXml, out msg); if (!string.IsNullOrEmpty(msg)) { LogHelper.WriteError(msg + "xml" + xml); } return(b); }