Esempio 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'));
        }
Esempio 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);
        }
Esempio n. 3
0
 public static int GetSmsOutId()
 {
     return(TimIdUtils.GenUtoId("SMSOUTID"));
 }
Esempio 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'));
        }