Esempio n. 1
0
        private void ComputeChecksAmountsPerWeek()
        {
            if (IsControlReady())
            {
                CheckService service = new CheckService(_checkRepository);

                Week1.Text =
                    DecimalAmountToPhp.ConvertToCurrency(service.ComputeChecksTotalInTheWeek(_firstWeek.Start,
                                                                                             _allChecks));

                Week2.Text =
                    DecimalAmountToPhp.ConvertToCurrency(service.ComputeChecksTotalInTheWeek(_secondWeek.Start,
                                                                                             _allChecks));

                Week3.Text =
                    DecimalAmountToPhp.ConvertToCurrency(service.ComputeChecksTotalInTheWeek(_thirdWeek.Start,
                                                                                             _allChecks));

                Week4.Text =
                    DecimalAmountToPhp.ConvertToCurrency(service.ComputeChecksTotalInTheWeek(_fourthWeek.Start,
                                                                                             _allChecks));

                Week5.Text =
                    DecimalAmountToPhp.ConvertToCurrency(service.ComputeChecksTotalInTheWeek(_fifthWeek.Start,
                                                                                             _allChecks));

                // This Section if for subtracting remaining

                WeekRemaining1.Text =
                    DecimalAmountToPhp.ConvertToCurrency(service.ComputeRemainingAmountInTheWeek(_firstWeek.Start,
                                                                                                 _allChecks));

                WeekRemaining2.Text =
                    DecimalAmountToPhp.ConvertToCurrency(service.ComputeRemainingAmountInTheWeek(_secondWeek.Start,
                                                                                                 _allChecks));

                WeekRemaining3.Text =
                    DecimalAmountToPhp.ConvertToCurrency(service.ComputeRemainingAmountInTheWeek(_thirdWeek.Start,
                                                                                                 _allChecks));

                WeekRemaining4.Text =
                    DecimalAmountToPhp.ConvertToCurrency(service.ComputeRemainingAmountInTheWeek(_fourthWeek.Start,
                                                                                                 _allChecks));

                WeekRemaining5.Text =
                    DecimalAmountToPhp.ConvertToCurrency(service.ComputeRemainingAmountInTheWeek(_fifthWeek.Start,
                                                                                                 _allChecks));
            }
        }