Example #1
0
        /// <summary>
        /// ปรับ level ที่มีจากการตั้งค่าเข้าไปในปี รวม rate ด้วย
        /// </summary>
        /// <param name="settings"></param>
        public void ReLevelFromSetting()
        {
            var setting = this.OfMarketingFee.OnDateAgentFee.SettingOwner;

            if (setting != null)
            {
                var settingYear = ((FEE_SETTING_TBANK)setting).GetOngoOnYearSettingByYear(this.YEAR_ORDER);

                foreach (var itemSetting in settingYear.SettingOnLevels)
                {
                    FeeOnGoReward newItem = new FeeOnGoReward()
                    {
                        FUY_ID    = this.FUY_ID,
                        OnYear    = this,
                        LEVEL     = itemSetting.LEVEL,
                        RATE_USED = itemSetting.RateCalculated
                    };

                    this.OnLevelDetails.Add(newItem);

                    if (itemSetting.LEVEL == 1)
                    {
                        this.RateLevelOne = itemSetting.RateCalculated;
                    }
                }
            }
        }
Example #2
0
        public FeeOnGoReward GetRewardDetailByLevel(int onLevel)
        {
            FeeOnGoReward findReward = this.OnLevelDetails.SingleOrDefault(m => m.LEVEL == onLevel) ?? new FeeOnGoReward();

            return(findReward);
        }