using System; using System.Collections.Generic; using System.Linq; using System.Text; using demo.ClassHelper.RandomOperate; namespace demo { class EmsPost { private static EmsPost m_instance = new EmsPost(); /// /// 创建一个静态实例 /// public static EmsPost Instance { get { return m_instance; } } public bool GetPostInfo(string idcNo, ref string[] postInfo) { bool ret = false; if (idcNo == null) { return false; } try { string recvNo = RandomHelper.GetRandomCode(GlobalVariable.randomTelNo, 11); int addressIndex = RandomHelper.GetRandom(0, GlobalVariable.address.Length); string recvAdd = GlobalVariable.address[addressIndex]; string traceNo = RandomHelper.GetRandomCode(GlobalVariable.randomTraceNo, GlobalVariable.scanGunParam.barcodeLen); postInfo = new string[] { recvNo, recvAdd, traceNo }; ret = true; } catch { } return ret; } } }