Beispiel #1
0
        public override IElement CreateEmpty()
        {
            var factory = new PayPatternFactory()
            {
                Project = Project
            };

            var pattern = factory.CreateEmpty() as IPayPattern;
            var payment = new Payment(Project.CurrentProject.Categories.First(), pattern);

            Project.CurrentProject.Elements.AddElement(payment);
            return(payment);
        }
Beispiel #2
0
        public IPayment Create(string name, ICategory category, double amount, PaymentIntervalType intervalType, MonthEnum startingMonth, ICategory subCategory = null)
        {
            var interval = Project.CurrentProject.Intervals.Single(i => i.Type == intervalType);
            var factory  = new PayPatternFactory()
            {
                Project = Project
            };
            var pattern = factory.Create(interval, startingMonth);

            var payment = new Payment(name, category, amount, pattern, subCategory);

            Project.CurrentProject.Elements.AddElement(payment);
            return(payment);
        }
Beispiel #3
0
        public IPayment Create(IMonth month, CategoryType categoryType)
        {
            var interval = Project.CurrentProject.Intervals.First();
            var factory  = new PayPatternFactory()
            {
                Project = Project
            };

            var pattern = factory.Create(interval, month.MonthType);

            Payment payment;

            payment = new Payment(Project.CurrentProject.Categories.Single(c => c.CategoryType == categoryType), pattern);
            Project.CurrentProject.Elements.AddElement(payment);

            return(payment);
        }