/// <summary> /// 创建单据编号生成器 /// </summary> /// <param name="billType">单据类型</param> /// <returns></returns> private static BillCodeCreator Create(BillType billType) { BillCodeCreator creator = null; var type = Type.GetType(string.Format("Yme.Mcp.Service.Common.{0}Code", billType.ToString())); creator = Activator.CreateInstance(type) as BillCodeCreator; return(creator); }
/// <summary> /// 获取单据编号 /// </summary> /// <returns>单据编号</returns> public static string GetBillCode(BillType billType) { return(BillCodeCreator.Create(billType).GetNewBillCode()); }