Ejemplo n.º 1
0
        public static string GenUtoIdPrefixAndYM(string prefix, string year, string month)
        {
            string str  = string.Empty;
            string name = prefix + year.PadLeft(4, '0') + month.PadLeft(2, '0');

            return(name + TimIdUtils.GenUtoId(name).ToString().PadLeft(4, '0'));
        }
Ejemplo n.º 2
0
        public static string GenUtoIdPrefixYMDAndNameY(string name)
        {
            string   str  = string.Empty;
            DateTime now  = DateTime.Now;
            string   str2 = now.Year.ToString().Substring(2, 2);
            string   str3 = str2.PadLeft(2, '0');
            string   str4 = now.Month.ToString().PadLeft(2, '0');
            string   str5 = now.Day.ToString().PadLeft(2, '0');
            string   str6 = TimIdUtils.GenUtoId(name.ToUpper() + str2).ToString().PadLeft(8, '0');

            return(str3 + str4 + str5 + str6);
        }
Ejemplo n.º 3
0
 public static int GetSmsOutId()
 {
     return(TimIdUtils.GenUtoId("SMSOUTID"));
 }
Ejemplo n.º 4
0
        public static string GenUtoId(string name, string prefix, int length)
        {
            string str = string.Empty;

            return(prefix + TimIdUtils.GenUtoId(name).ToString().PadLeft(length - prefix.Length, '0'));
        }