Пример #1
0
        public static void MapMonthlySummaryActual(this CommisionModel model, MonthSummary summary, ICommonService service)
        {
            int month = Convert.ToDateTime(model.AppliedDate).Month;

            switch (month)
            {
            case 1:
                summary.JanA = model.CommisionValue ?? 0;
                break;

            case 2:
                summary.FebA = model.CommisionValue ?? 0;
                break;

            case 3:
                summary.MarA = model.CommisionValue ?? 0;
                break;

            case 4:
                summary.AprA = model.CommisionValue ?? 0;
                break;

            case 5:
                summary.MayA = model.CommisionValue ?? 0;
                break;

            case 6:
                summary.JunA = model.CommisionValue ?? 0;
                break;

            case 7:
                summary.JulA = model.CommisionValue ?? 0;
                break;

            case 8:
                summary.AugA = model.CommisionValue ?? 0;
                break;

            case 9:
                summary.SepA = model.CommisionValue ?? 0;
                break;

            case 10:
                summary.OctA = model.CommisionValue ?? 0;
                break;

            case 11:
                summary.NovA = model.CommisionValue ?? 0;
                break;

            case 12:
                summary.DecA = model.CommisionValue ?? 0;
                break;
            }
        }
Пример #2
0
        public static void MapMonthlySummaryBudget(this CommisionModel model, MonthSummary summary, ICommonService service)
        {
            int month = Convert.ToDateTime(model.AppliedDate).Month;
            int year  = Convert.ToDateTime(model.AppliedDate).Year;
            var bud   = service.GetAllPolicyBudgetsForPolicyYearMonth(model.PolicyId, year, GetMonth(month));

            if (bud == null)
            {
                return;
            }
            switch (month)
            {
            case 1:
                summary.JanB = bud.BudgetValue;
                break;

            case 2:
                summary.FebB = bud.BudgetValue;
                break;

            case 3:
                summary.MarB = bud.BudgetValue;
                break;

            case 4:
                summary.AprB = bud.BudgetValue;
                break;

            case 5:
                summary.MayB = bud.BudgetValue;
                break;

            case 6:
                summary.JunB = bud.BudgetValue;
                break;

            case 7:
                summary.JulB = bud.BudgetValue;
                break;

            case 8:
                summary.AugB = bud.BudgetValue;
                break;

            case 9:
                summary.SepB = bud.BudgetValue;
                break;

            case 10:
                summary.OctB = bud.BudgetValue;
                break;

            case 11:
                summary.NovB = bud.BudgetValue;
                break;

            case 12:
                summary.DecB = bud.BudgetValue;
                break;
            }
        }