/// <summary> /// Creates new savings account for n number of new clients /// </summary> /// <param name="version">The version.</param> /// <param name="cli">The cli.</param> public static void createSaving(AccountVersion version, params Client[] client) { Console.Beep(); foreach (var cli in client) { Savings saver = new Savings(cli); DataBank <Savings> saverdata = new DataBank <Savings>(cli, saver); saverdata.BackUpData(saverdata); } }
public AccountVersion GetAccountVersion(int accId) { var redisCacheService = new RedisCacheService(); var accVersionRedisKey = RedisConsts.AccountVersion + accId.ToString(); var accVersionResult = redisCacheService.Get <AccountVersion>(accVersionRedisKey); if (accVersionResult != null) { _logger.Debug(string.Format("Get app account version from redis cache. {0},{1} ", accId, accVersionRedisKey)); return(accVersionResult); } var accVersion = GetAccountVersionBasic(accId); var entity = new AccountVersion { Version = accVersion.Version, VersionExpirationTime = accVersion.VersionExpirationTime }; entity.VersionName = entity.Version.ToEnumDescriptionString(typeof(AccountVersionEnum)); //行业版 if (entity.Version == (int)AccountVersionEnum.Industry) { entity.SubVersionName = accVersion.IndustryName; } //试用高级版 if (entity.Version == (int)AccountVersionEnum.Advanced && accVersion.BetaAdvance == (int)BetaAdvanceEnum.UsingBetaAdvance) { entity.SubVersionName = Convert.ToInt32(BetaAdvanceEnum.UsingBetaAdvance).ToEnumDescriptionString(typeof(AccountVersionEnum)); } //todo:终身高级版 //todo:购买后更新redis var expireSeconds = 108000; redisCacheService.Set(accVersionRedisKey, entity, expireSeconds); return(entity); }
/// <summary> /// Creates new sealed account for n number of new clients /// </summary> /// <param name="version">The version.</param> /// <param name="cli">The cli.</param> public static void createSealed(AccountVersion version, params Client[] cli) { Console.Beep(); }
/// <summary> /// Initializes a new instance of the <see cref="AccountNumber" /> struct. /// </summary> /// <param name="version">The version of account.</param> /// <param name="CID">The cid.</param> public AccountNumber(AccountVersion version, string CID) { acc_Number = CID; this.CID = CID; }