/// <summary>
        /// 获取系统设置
        /// </summary>
        /// <param name="db">数据库连接对象</param>
        /// <returns>返回系统设置</returns>
        public NormalResult<SettingExport> GetSetting(IModelToDbContextOfAuthor db)
        {
            SettingOfBase settingOfBase = new SettingOfBase(db);
            SettingOfAuthor settingOfAuthor = new SettingOfAuthor(db);
            SettingOfLottery settingOfLottery = new SettingOfLottery(db);

            var s = new SettingExport(settingOfBase, settingOfAuthor, settingOfLottery);
            return new NormalResult<SettingExport>(s);
        }
 /// <summary>
 /// 实例化一个新的彩票相关的系统设置
 /// </summary>
 /// <param name="model">彩票相关的系统设置的数据模型</param>
 public SettingOfLotteryExport(SettingOfLottery model)
 {
     this.UnitPrice = model.UnitPrice;
     this.PayoutBase = model.PayoutBase;
     this.LineForProhibitBetting = model.LineForProhibitBetting;
     this.MaximumPayout = model.MaximumPayout;
     this.ConversionRates = model.ConversionRates;
     this.MaximumBetsNumber = model.MaximumBetsNumber;
     this.ClosureSingleTime = model.ClosureSingleTime;
 }
        /// <summary>
        /// 设置并保存
        /// </summary>
        /// <param name="db"></param>
        public void SetAndSave(IModelToDbContextOfLottery db)
        {
            SettingOfLottery setting = new SettingOfLottery(db);

            setting.UnitPrice = this.UnitPrice;
            setting.PayoutBase = this.PayoutBase;
            setting.LineForProhibitBetting = this.LineForProhibitBetting;
            setting.MaximumPayout = this.MaximumPayout;
            setting.ConversionRates = this.ConversionRates;
            setting.MaximumBetsNumber = this.MaximumBetsNumber;
            setting.ClosureSingleTime = this.ClosureSingleTime;

            setting.Save(db);
        }
        /// <summary>
        /// 设置
        /// </summary>
        /// <param name="settingOfBase">基本设置</param>
        /// <param name="settingOfAuthor">用户设置</param>
        /// <param name="settingOfLottery">彩票设置</param>
        public SettingExport(SettingOfBase settingOfBase, SettingOfAuthor settingOfAuthor, SettingOfLottery settingOfLottery)
        {
            this.PageSizeForClient = settingOfBase.PageSizeForClient;
            this.PageSizeForAdmin = settingOfBase.PageSizeForAdmin;
            this.HeartbeatInterval = settingOfBase.HeartbeatInterval;
            this.WorkingHour_Begin = settingOfBase.WorkingHour_Begin;
            this.WorkingHour_End = settingOfBase.WorkingHour_End;
            this.VirtualQueuing = settingOfBase.VirtualQueuing;
            this.CollectionRunning = settingOfBase.CollectionRunning;

            this.LowerRebate = settingOfAuthor.LowerRebate;
            this.CapsRebate = settingOfAuthor.CapsRebate;
            this.LowerRebateOfHigh = settingOfAuthor.LowerRebateOfHigh;
            this.CapsRebateOfHigh = settingOfAuthor.CapsRebateOfHigh;
            this.RechargeRecordTimeout = settingOfAuthor.RechargeRecordTimeout;
            this.SpreadRecordTimeout = settingOfAuthor.SpreadRecordTimeout;
            this.ForgotPasswordRecordTimeout = settingOfAuthor.ForgotPasswordRecordTimeout;
            this.DaysOfDividend = settingOfAuthor.DaysOfDividend;
            this.TimesOfWithdrawal = settingOfAuthor.TimesOfWithdrawal;
            this.MinimumWithdrawalAmount = settingOfAuthor.MinimumWithdrawalAmount;
            this.MaximumWithdrawalAmount = settingOfAuthor.MaximumWithdrawalAmount;
            this.Commission_A = settingOfAuthor.Commission_A;
            this.Commission_B = settingOfAuthor.Commission_B;
            this.LowerConsumptionForCommission = settingOfAuthor.LowerConsumptionForCommission;
            this.Dividend_A = settingOfAuthor.Dividend_A;
            this.Dividend_B = settingOfAuthor.Dividend_B;
            this.LowerConsumptionForDividend = settingOfAuthor.LowerConsumptionForDividend;
            this.ClearUser_DaysOfInactive = settingOfAuthor.ClearUser_DaysOfInactive;
            this.ClearUser_DaysOfUnSetIn = settingOfAuthor.ClearUser_DaysOfUnSetIn;
            this.ClearUser_LowerOfMoney = settingOfAuthor.ClearUser_LowerOfMoney;
            this.ClearUser_DaysOfUnMoneyChange = settingOfAuthor.ClearUser_DaysOfUnMoneyChange;

            this.UnitPrice = settingOfLottery.UnitPrice;
            this.PayoutBase = settingOfLottery.PayoutBase;
            this.LineForProhibitBetting = settingOfLottery.LineForProhibitBetting;
            this.MaximumPayout = settingOfLottery.MaximumPayout;
            this.ConversionRates = settingOfLottery.ConversionRates;
            this.MaximumBetsNumber = settingOfLottery.MaximumBetsNumber;
            this.ClosureSingleTime = settingOfLottery.ClosureSingleTime;
        }