public void UpdateAppSubType(string name) { AppSubType t = AppSubType.ToObject(name); char[] temp = _value.ToCharArray(); temp.SetValue((int)t, 12); _value = temp.ToString(); }
protected string Generate(AppType style, AppSubType orientation) { string header = orientation == AppSubType.NonSingle ? "G" : "S"; string date = DateTime.Now.ToString("yyyyMMdd"); string s = "0" + (int)style; string o = "0" + (int)orientation; string random4 = DateTime.UtcNow.Ticks.ToString().Substring(13, 4); return(header + date + s + o + random4); }
public static string ToLabel(this AppSubType subType, AppType type) { switch (subType) { case AppSubType.Single: return(type == AppType.Visa ? "单人" : "单认证"); case AppSubType.NonSingle: default: return(type == AppType.Visa ? "团体" : "双认证"); } }
public static AppSubType ToObject(this AppSubType subType, string name) { switch (name) { case "单人": case "单认证": return(AppSubType.Single); case "团体": case "双认证": default: return(AppSubType.NonSingle); } }
public void UpdateAppSubType(AppSubType subType) { char[] temp = _value.ToCharArray(); temp.SetValue((int)subType, 12); _value = temp.ToString(); }
public static Identifier New(AppType style, AppSubType orien) { return new Identifier(style,orien); }
public Identifier(string value) { _value = value; _appType = GetAppType(value); _appSubType = GetAppSubType(value); }
public Identifier(AppType appType, AppSubType orien) { _appType = appType; _appSubType = orien; _value = Generate(appType, orien); }
protected string Generate(AppType style, AppSubType orientation) { string header = orientation == AppSubType.NonSingle ? "G" : "S"; string date = DateTime.Now.ToString("yyyyMMdd"); string s = "0" + (int) style; string o = "0" + (int) orientation; string random4 = DateTime.UtcNow.Ticks.ToString().Substring(13, 4); return header + date + s + o+random4; }
public static Identifier New(AppType style, AppSubType orien) { return(new Identifier(style, orien)); }