代码如下: #region 生成单据号 /// <summary> /// 生成单据号 /// </summary> /// <param name=”pFromType”></param> /// <returns></returns> public static string GetFormCode(FormType pFromType) { string formcode = “”; switch(pFromType) { case FormType.CaiGou: { formcode = “CG”; break; } case FormType.ChaiXie: { formcode