예제 #1
0
        /// <summary>
        /// 根据字符串定义查询流水号
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        public virtual string GetSwiftNumByDay(string name)
        {
            Proc_SwiftNumEntity entity = new Proc_SwiftNumEntity();

            entity.Day       = DateTime.Now.ToString("yyyy-MM-dd");
            entity.TabName   = name;
            entity.CompanyID = this.CompanyID;
            this.Proc_SwiftNum.ExecuteNonQuery(entity);
            if (entity != null)
            {
                return(entity.Num.ToString());
            }
            return(string.Empty);
        }
예제 #2
0
        /// <summary>
        /// 获得日期的流水号
        /// </summary>
        /// <param name="type"></param>
        /// <returns></returns>
        public virtual string GetSwiftNumByDay(Type type)
        {
            TableInfo           tableInfo = EntityTypeCache.Get(type);
            Proc_SwiftNumEntity entity    = new Proc_SwiftNumEntity();

            entity.Day     = DateTime.Now.ToString("yyyy-MM-dd");
            entity.TabName = tableInfo.Table.Name;
            this.Proc_SwiftNum.ExecuteNonQuery(entity);
            if (entity != null)
            {
                return(entity.Num.ToString());
            }
            return(string.Empty);
        }
예제 #3
0
        /// <summary>
        /// 获得不间断流水
        /// </summary>
        /// <param name="type"></param>
        /// <returns></returns>
        public virtual string GetSwiftNum(Type type)
        {
            TableInfo           tableInfo = EntityTypeCache.Get(type);
            Proc_SwiftNumEntity entity    = new Proc_SwiftNumEntity();

            entity.Day       = string.Empty;
            entity.TabName   = tableInfo.Table.Name;
            entity.CompanyID = this.CompanyID;
            this.Proc_SwiftNum.ExecuteNonQuery(entity);
            if (entity != null)
            {
                return(entity.Num.ToString());
            }
            return(string.Empty);
        }