コード例 #1
0
        private static bool isAMethodWithALimit(DeprMethod deprMethod)
        {
            switch (deprMethod.Type)
            {
            case DeprMethodTypeEnum.MacrsFormula:
            case DeprMethodTypeEnum.MacrsTable:
            case DeprMethodTypeEnum.AdsSlMacrs:
            case DeprMethodTypeEnum.AcrsTable:
            case DeprMethodTypeEnum.StraightLineAltAcrsFormula:
            case DeprMethodTypeEnum.StraightLineAltAcrsTable:
                return(true);

            default:
                return(false);
            }
        }
コード例 #2
0
        public bool isAmountOverLimit(DateTime pisDate, PropertyType propType, DeprMethod deprMethod)
        {
            if (Amount == 0.0)
            {
                return(false);
            }

            double limit = amountLimit(pisDate, propType, deprMethod);

            if (limit != -1.0 && Amount > limit)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #3
0
        public static double amountLimit(DateTime pisDate, PropertyType propType, DeprMethod deprMethod)
        {
            double limit = 0.0;

            if (propType.Type != PropertyTypeEnum.Automobile && propType.Type != PropertyTypeEnum.LtTrucksAndVans)
            {
                return(-1.0);
            }

            if (isAMethodWithALimit(deprMethod) == false)
            {
                return(-1.0);
            }


            if (pisDate < new DateTime(1984, 6, 19))
            {
                limit = -1.0;
            }
            else
            if (pisDate <= new DateTime(1984, 12, 31))
            {
                limit = 1000.0;
            }
            else
            if (pisDate <= new DateTime(1985, 4, 2))
            {
                limit = 1000.0;
            }
            else
            if (pisDate <= new DateTime(1986, 12, 31))
            {
                limit = 675.0;
            }
            else
            if (pisDate >= new DateTime(1992, 1, 1))
            {
                limit = 0.0;
            }

            return(limit);
        }
コード例 #4
0
 public DeprMethodCode(DeprMethod obj)
     : base(obj)
 {
     _stable = true;
 }
コード例 #5
0
 public DeprMethod(DeprMethod obj)
 {
     _pct = 0;
     copyFrom(obj);
 }
コード例 #6
0
 public void copyFrom(DeprMethod obj)
 {
     Type       = obj.Type;
     Percentage = obj.Percentage;
 }
コード例 #7
0
        public override bool Equals(object obj)
        {
            DeprMethod that = obj as DeprMethod;

            return(this == that);
        }