Example #1
0
        /// <summary>
        /// 获取票根编码
        /// </summary>
        /// <returns></returns>
        private static int GetTicketNumber()
        {
            TicketMaker ticketMaker = TicketMaker.GetInstance();
            int         number      = ticketMaker.GetNextTickerNumber();

            return(number);
        }
 /// <summary>
 /// 获取实例的方法
 /// </summary>
 /// <returns>返回实例</returns>
 public static TicketMaker GetInstance()
 {
     lock (obj)
     {
         if (_TicketMacker == null)
         {
             _TicketMacker = new TicketMaker();
         }
     }
     return(_TicketMacker);
 }