Esempio n. 1
0
        private static void SeedFilingStatuses(SupportContext context)
        {
            // Add FilingStatus
            var filingStatuses = new List <FilingStatus>
            {
                new FilingStatus()
                {
                    Code = "Single", Name = "Single"
                },
                new FilingStatus()
                {
                    Code = "Head", Name = "Head of Household"
                },
                new FilingStatus()
                {
                    Code = "Jointly", Name = "Married Filing Jointly"
                },
                new FilingStatus()
                {
                    Code = "Seperately", Name = "Married Filing Seperatly"
                },
                new FilingStatus()
                {
                    Code = "Widow", Name = "Qualified Widow"
                }
            };

            filingStatuses.ForEach(s => context.FilingStatus.Add(s));
            context.SaveChanges();
        }
Esempio n. 2
0
        /// <summary>
        /// Wrapper for SaveChanges adding the Validation Messages to the generated exception
        /// </summary>
        /// <param name="context">The context.</param>
        private void SaveChanges(SupportContext context)
        {
            try
            {
                context.SaveChanges();
            }
            catch (DbEntityValidationException ex)
            {
                StringBuilder sb = new StringBuilder();

                foreach (var failure in ex.EntityValidationErrors)
                {
                    sb.AppendFormat("{0} failed validation\n", failure.Entry.Entity.GetType());
                    foreach (var error in failure.ValidationErrors)
                    {
                        sb.AppendFormat("- {0} : {1}", error.PropertyName, error.ErrorMessage);
                        sb.AppendLine();
                    }
                }

                throw new DbEntityValidationException("Entity Validation Failed - errors follow:\n" + sb.ToString(), ex);
            }
            catch (DbUnexpectedValidationException ex)
            {
                StringBuilder sb = new StringBuilder();

                throw new DbEntityValidationException("DbUnexpectedValidation Exception Failed - errors follow:\n" + ex.InnerException.ToString(), ex);
            }
            catch (Exception ex)
            {
                throw new DbEntityValidationException("Exception - errors follow:\n" + ex.ToString(), ex);
            }
        }
Esempio n. 3
0
        private static void SeedDeductionTypes(SupportContext context)
        {
            // Add Deduction Types
            var deductionTypes = new List <DeductionType>
            {
                new DeductionType()
                {
                    Name = "Alimony / Spousal Support", Description = "Deduct alimony/spousal support paid to someone other than the other parent in the case under consideration from its payer’s gross income before calculating and deducting its payer’s federal, state, and local income taxes, and after deducting other mandatory federal taxes (e.g., FICA).", FederalTax = true, NIITax = false, AMTTax = true, SETax = false, StateTax = true, FICA = true, CityTax = true, Code = "Alimony"
                },
                new DeductionType()
                {
                    Name = "Employer Mandated Payments", Description = "2.07(C) Deduct any mandatory payments withheld as a condition of employment (e.g., most union dues and some retirement plans).", FederalTax = true, NIITax = false, AMTTax = true, SETax = false, StateTax = true, FICA = false, CityTax = true, Code = "Mandated"
                },
                new DeductionType()
                {
                    Name = "Life Insurance Policy Premiums", Description = "2.07(D) Deduct life insurance policy premiums when children-in-common with the other parent are the beneficiaries. (ordered by the court)", FederalTax = false, AMTTax = false, NIITax = true, SETax = false, StateTax = true, FICA = true, CityTax = false, Code = "LifeIns"
                },
                new DeductionType()
                {
                    Name = "Roth IRA (After-Tax)", Description = "Deduct contributions to pensions, retirement plans, or private qualified pension plans, but only up to 5.5 percent of the employee’s parent’s gross income. After-Tax include include Roth IRA and Roth 401(k) contributions.", FederalTax = true, NIITax = false, AMTTax = true, SETax = false, StateTax = false, FICA = true, CityTax = false, Code = "RothIRA"
                },
                new DeductionType()
                {
                    Name = "Traditional IRA (Pre-Tax)", Description = "Deduct contributions to pensions, retirement plans, or private qualified pension plans, but only up to 5.5 percent of the employee’s parent’s gross income. Pre-Tax would include Traditional IRA and Traditional 401(k) contributions.", FederalTax = true, AMTTax = false, NIITax = true, SETax = false, StateTax = true, CityTax = true, FICA = false, Code = "TradIRA"
                },
                new DeductionType()
                {
                    Name = "Roth 401(k) (After-Tax)", Description = "Deduct contributions to pensions, retirement plans, or private qualified pension plans, but only up to 5.5 percent of the employee’s parent’s gross income. After-Tax include include Roth IRA and Roth 401(k) contributions.", FederalTax = true, NIITax = false, AMTTax = true, SETax = false, StateTax = false, FICA = true, CityTax = false, Code = "Roth401"
                },
                new DeductionType()
                {
                    Name = "Traditional 401(k) (Pre-Tax)", Description = "Deduct contributions to pensions, retirement plans, or private qualified pension plans, but only up to 5.5 percent of the employee’s parent’s gross income. Pre-Tax would include Traditional IRA and Traditional 401(k) contributions.", FederalTax = true, NIITax = false, AMTTax = true, SETax = false, StateTax = true, CityTax = true, FICA = false, Code = "Trad401"
                },
                new DeductionType()
                {
                    Name = "457 (Pre-Tax)", Description = "Deduct contributions to pensions, retirement plans, or private qualified pension plans, but only up to 5.5 percent of the employee’s parent’s gross income. Pre-Tax would include Traditional IRA and Traditional 401(k) contributions.", FederalTax = true, NIITax = false, AMTTax = true, SETax = false, StateTax = false, FICA = true, CityTax = false, Code = "457"
                },
                new DeductionType()
                {
                    Name = "403(b) (Pre-Tax)", Description = "Deduct contributions to pensions, retirement plans, or private qualified pension plans, but only up to 5.5 percent of the employee’s parent’s gross income. Pre-Tax would include Traditional IRA and Traditional 401(k) contributions.", FederalTax = true, NIITax = false, AMTTax = true, SETax = false, StateTax = false, FICA = true, CityTax = false, Code = "403"
                }
            };

            deductionTypes.ForEach(s => context.DeductionTypes.Add(s));
            context.SaveChanges();
        }
Esempio n. 4
0
        private static void SeedPartyTypes(SupportContext context)
        {
            // Add PartyType
            var partyTypes = new List <PartyType>
            {
                new PartyType()
                {
                    Code = "A", Name = "Parent A", Description = "Plaintiff. The biological/legal parent of the child(ren)."
                },
                new PartyType()
                {
                    Code = "B", Name = "Parent B", Description = "efendant. The biological/legal parent of the child(ren)."
                },
                new PartyType()
                {
                    Code = "3", Name = "Third Party", Description = "A legal gaurdian. Anyone except one of the biological parents of the child(ren)."
                }
            };

            partyTypes.ForEach(s => context.PartyTypes.Add(s));
            context.SaveChanges();
        }
Esempio n. 5
0
        private static void SeedIncomeTypes(SupportContext context)
        {
            // Add Income Types
            var incomeTypes = new List <IncomeType>
            {
                new IncomeType()
                {
                    Name = "Annual Wages & Overtime", Description = "(1) Wages, overtime pay, commissions, bonuses, or other monies from all employers or as a result of any employment (usually, as reported in the Medicare, wages, and tips section of the parent’s W-2).", FederalTax = true, NIITax = false, AMTTax = true, SETax = false, StateTax = true, FICA = true, CityTax = true, Code = "wages"
                },
                new IncomeType()
                {
                    Name = "Commissions, Bonuses & Tips", Description = "(1) Wages, overtime pay, commissions, bonuses, or other monies from all employers or as a result of any employment (usually, as reported in the Medicare, wages, and tips section of the parent’s W-2).", FederalTax = true, NIITax = false, AMTTax = true, SETax = false, StateTax = true, FICA = true, CityTax = true, Code = "bonuses"
                },
                new IncomeType()
                {
                    Name = "Gambing & Lottery Winnings", Description = "(5) Tips, gratuities, royalties, interest, dividends, fees, or gambling or lottery winnings to the extent that they represent regular income or may be used to generate regular income.", FederalTax = true, NIITax = false, AMTTax = true, SETax = false, StateTax = true, FICA = false, CityTax = true, Code = "winnings"
                },
                new IncomeType()
                {
                    Name = "Military Retirement", Description = "(4) Military specialty pay, allowance for quarters and rations, BAH-II, veterans’ administration benefits, G.I. benefits (other than education allotment), or drill pay.", FederalTax = false, NIITax = false, AMTTax = false, SETax = false, StateTax = false, FICA = false, CityTax = false, Code = "milretire"
                },
                new IncomeType()
                {
                    Name = "Military Basic, Special, Bonus & Incentive Pay", Description = "(4) Military specialty pay, allowance for quarters and rations, BAH-II, veterans’ administration benefits, G.I. benefits (other than education allotment), or drill pay.", FederalTax = true, NIITax = false, AMTTax = true, SETax = false, StateTax = true, FICA = true, CityTax = true, Code = ""
                },
                new IncomeType()
                {
                    Name = "Post 9-11 GI BAH-II Payments", Description = "(4) Military specialty pay, allowance for quarters and rations, BAH-II, veterans’ administration benefits, G.I. benefits (other than education allotment), or drill pay.", FederalTax = false, NIITax = false, AMTTax = false, SETax = false, StateTax = false, FICA = false, CityTax = false, Code = ""
                },
                new IncomeType()
                {
                    Name = "Military Combat, Travel, Moving, Living, Dealth & Other Pay", Description = "(4) Military specialty pay, allowance for quarters and rations, BAH-II, veterans’ administration benefits, G.I. benefits (other than education allotment), or drill pay.", FederalTax = false, NIITax = false, AMTTax = false, SETax = false, StateTax = false, FICA = false, CityTax = false, Code = ""
                },
                new IncomeType()
                {
                    Name = "VA Penision & Compensation", Description = "(4) Military specialty pay, allowance for quarters and rations, BAH-II, veterans’ administration benefits, G.I. benefits (other than education allotment), or drill pay.", FederalTax = false, NIITax = false, AMTTax = false, SETax = false, StateTax = false, FICA = false, CityTax = false, Code = ""
                },
                new IncomeType()
                {
                    Name = "VA Vocational Rehabilitation", Description = "(4) Military specialty pay, allowance for quarters and rations, BAH-II, veterans’ administration benefits, G.I. benefits (other than education allotment), or drill pay.", FederalTax = false, NIITax = false, AMTTax = false, SETax = false, StateTax = false, FICA = false, CityTax = false, Code = ""
                },
                new IncomeType()
                {
                    Name = "Royalites, Rental Property, Bank Account Interest", Description = "(2) Earnings generated from a business, partnership, contract, self-employment, or other similar arrangement, or from rentals. §2.01(E). (5) Tips, gratuities, royalties, interest, dividends, fees, or gambling or lottery winnings to the extent that they represent regular income or may be used to generate regular income.", FederalTax = true, NIITax = false, AMTTax = true, SETax = false, StateTax = true, FICA = true, CityTax = true, Code = ""
                },
                new IncomeType()
                {
                    Name = "Annuities, Interest Payments, & Short Term Gains", Description = "Needs Description", FederalTax = true, NIITax = true, AMTTax = true, SETax = false, StateTax = true, FICA = false, CityTax = false, Code = ""
                },
                new IncomeType()
                {
                    Name = "Contract Income & Self-Employment", Description = "(3) Distributed profits or payments from profit-sharing, a pension or retirement, an insurance contract, an annuity, trust fund, deferred compensation, retirement account, social security, unemployment compensation, supplemental unemployment benefits, disability insurance or benefits, or worker’s compensation.", FederalTax = true, NIITax = false, AMTTax = true, SETax = true, StateTax = true, FICA = true, CityTax = true, Code = ""
                },
                new IncomeType()
                {
                    Name = "Social Security - Parents", Description = "(3) Distributed profits or payments from profit-sharing, a pension or retirement, an insurance contract, an annuity, trust fund, deferred compensation, retirement account, social security, unemployment compensation, supplemental unemployment benefits, disability insurance or benefits, or worker’s compensation.", FederalTax = true, NIITax = false, AMTTax = true, SETax = false, StateTax = false, FICA = false, CityTax = false, Code = ""
                },
                new IncomeType()
                {
                    Name = "Social Security - Children", Description = "(3) Distributed profits or payments from profit-sharing, a pension or retirement, an insurance contract, an annuity, trust fund, deferred compensation, retirement account, social security, unemployment compensation, supplemental unemployment benefits, disability insurance or benefits, or worker’s compensation.", FederalTax = false, NIITax = false, AMTTax = false, SETax = false, StateTax = false, FICA = false, CityTax = false, Code = ""
                },
                new IncomeType()
                {
                    Name = "Business Income, Partnership, & Profit-Sharing", Description = "(3) Distributed profits or payments from profit-sharing, a pension or retirement, an insurance contract, an annuity, trust fund, deferred compensation, retirement account, social security, unemployment compensation, supplemental unemployment benefits, disability insurance or benefits, or worker’s compensation.", FederalTax = true, NIITax = false, AMTTax = true, SETax = true, StateTax = true, FICA = true, CityTax = true, Code = ""
                },
                new IncomeType()
                {
                    Name = "Insurance Contract", Description = "Needs Description", FederalTax = true, NIITax = false, AMTTax = true, SETax = false, StateTax = true, FICA = true, CityTax = true, Code = ""
                },
                new IncomeType()
                {
                    Name = "Qualified Retirement & Pension Accounts", Description = "Needs Description", FederalTax = true, NIITax = false, AMTTax = true, SETax = false, StateTax = true, FICA = false, CityTax = true, Code = ""
                },
                new IncomeType()
                {
                    Name = "Unemployment Compensation & Supplemental Unemployment Benefits", Description = "Needs Description", FederalTax = true, NIITax = false, AMTTax = true, SETax = false, StateTax = true, FICA = false, CityTax = true, Code = ""
                },
                new IncomeType()
                {
                    Name = "Trust Fund Income", Description = "Needs Description", FederalTax = true, NIITax = false, AMTTax = true, SETax = false, StateTax = true, FICA = true, CityTax = true, Code = ""
                },
                new IncomeType()
                {
                    Name = "Workers Compensation and Disablity Insurance", Description = "Needs Description", FederalTax = false, NIITax = false, AMTTax = false, SETax = false, StateTax = false, FICA = false, CityTax = false, Code = ""
                },
                new IncomeType()
                {
                    Name = "Qualified Retirement & Pension Accounts-Born before 1946", Description = "Needs Description", FederalTax = true, NIITax = false, AMTTax = true, SETax = false, StateTax = true, FICA = false, CityTax = true, Code = ""
                },
                new IncomeType()
                {
                    Name = "Employer provided expense account (Meals, Room & Board, & Business Vehicle)", Description = "Needs Description", FederalTax = true, NIITax = false, AMTTax = true, SETax = false, StateTax = true, FICA = true, CityTax = true, Code = ""
                }
            };

            incomeTypes.ForEach(s => context.IncomeTypes.Add(s));
            context.SaveChanges();
        }
Esempio n. 6
0
        private static void SeedCityTaxes(SupportContext context)
        {
            // Add CityTax Table
            var cityTaxes = new List <CityTax>
            {
                new CityTax()
                {
                    Name = "No City Tax", TaxRate = 0.000m
                },
                new CityTax()
                {
                    Name = "Albion (Resident)", TaxRate = 0.010m
                },
                new CityTax()
                {
                    Name = "Albion (Non-Resident)", TaxRate = 0.005m
                },
                new CityTax()
                {
                    Name = "Battle Creek (Resident)", TaxRate = 0.010m
                },
                new CityTax()
                {
                    Name = "Battle Creek (Non-Resident)", TaxRate = 0.005m
                },
                new CityTax()
                {
                    Name = "Big Rapids (Resident)", TaxRate = 0.010m
                },
                new CityTax()
                {
                    Name = "Big Rapids (Non-Resident)", TaxRate = 0.005m
                },
                new CityTax()
                {
                    Name = "Flint (Resident)", TaxRate = 0.010m
                },
                new CityTax()
                {
                    Name = "Flint (Non-Resident)", TaxRate = 0.005m
                },
                new CityTax()
                {
                    Name = "Grayling (Resident)", TaxRate = 0.010m
                },
                new CityTax()
                {
                    Name = "Grayling (Non-Resident)", TaxRate = 0.005m
                },
                new CityTax()
                {
                    Name = "Hamtramck (Resident)", TaxRate = 0.010m
                },
                new CityTax()
                {
                    Name = "Hamtramck (Non-Resident)", TaxRate = 0.005m
                },
                new CityTax()
                {
                    Name = "Hudson (Resident)", TaxRate = 0.010m
                },
                new CityTax()
                {
                    Name = "Hudson (Non-Resident)", TaxRate = 0.005m
                },
                new CityTax()
                {
                    Name = "Ionia (Resident)", TaxRate = 0.010m
                },
                new CityTax()
                {
                    Name = "Ionia (Non-Resident)", TaxRate = 0.005m
                },
                new CityTax()
                {
                    Name = "Jackson (Resident)", TaxRate = 0.010m
                },
                new CityTax()
                {
                    Name = "Jackson (Non-Resident)", TaxRate = 0.005m
                },
                new CityTax()
                {
                    Name = "Lansing (Resident)", TaxRate = 0.010m
                },
                new CityTax()
                {
                    Name = "Lansing (Non-Resident)", TaxRate = 0.005m
                },
                new CityTax()
                {
                    Name = "Lapeer (Resident)", TaxRate = 0.010m
                },
                new CityTax()
                {
                    Name = "Lapeer (Non-Resident)", TaxRate = 0.005m
                },
                new CityTax()
                {
                    Name = "Muskegon (Resident)", TaxRate = 0.010m
                },
                new CityTax()
                {
                    Name = "Muskegon (Non-Resident)", TaxRate = 0.005m
                },
                new CityTax()
                {
                    Name = "Muskegon Heights (Resident)", TaxRate = 0.010m
                },
                new CityTax()
                {
                    Name = "Muskegon Heights (Non-Resident)", TaxRate = 0.005m
                },
                new CityTax()
                {
                    Name = "Pontiac (Resident)", TaxRate = 0.010m
                },
                new CityTax()
                {
                    Name = "Pontiac (Non-Resident)", TaxRate = 0.005m
                },
                new CityTax()
                {
                    Name = "Port Huron (Resident)", TaxRate = 0.010m
                },
                new CityTax()
                {
                    Name = "Port Huron (Non-Resident)", TaxRate = 0.005m
                },
                new CityTax()
                {
                    Name = "Portland (Resident)", TaxRate = 0.010m
                },
                new CityTax()
                {
                    Name = "Portland (Non-Resident)", TaxRate = 0.005m
                },
                new CityTax()
                {
                    Name = "Springfield (Resident)", TaxRate = 0.010m
                },
                new CityTax()
                {
                    Name = "Springfield (Non-Resident)", TaxRate = 0.005m
                },
                new CityTax()
                {
                    Name = "Walker (Resident)", TaxRate = 0.010m
                },
                new CityTax()
                {
                    Name = "Walker (Non-Resident)", TaxRate = 0.005m
                },
                new CityTax()
                {
                    Name = "Detroit (Resident)", TaxRate = 0.024m
                },
                new CityTax()
                {
                    Name = "Detroit (Non-Resident)", TaxRate = 0.014m
                },
                new CityTax()
                {
                    Name = "Grand Rapids (Resident)", TaxRate = 0.015m
                },
                new CityTax()
                {
                    Name = "Grand Rapids (Non-Resident)", TaxRate = 0.075m
                },
                new CityTax()
                {
                    Name = "Highland Park (Resident)", TaxRate = 0.020m
                },
                new CityTax()
                {
                    Name = "Highland Park (Non-Resident)", TaxRate = 0.010m
                },
                new CityTax()
                {
                    Name = "Saginaw (Resident)", TaxRate = 0.015m
                },
                new CityTax()
                {
                    Name = "Saginaw (Non-Resident)", TaxRate = 0.075m
                }
            };

            cityTaxes.ForEach(s => context.CityTaxes.Add(s));
            context.SaveChanges();
        }