예제 #1
0
 private void calculatePageCosts(Boolean isA4)
 {
     PageCosts pageCosts = new PageCosts();
     if (isA4 == false) // calculate for an A3 page
     {
         lblBWCostOutput.Content =pageCosts.A3BWPerPage;
         lblColourCostOutput.Content =  pageCosts.A3ColourPerPage;
     }
     else // calculate for A4 page
     {
         lblBWCostOutput.Content =pageCosts.A4BWPerPage;
         lblColourCostOutput.Content = pageCosts.A4ColourPerPage;
     }
 }
예제 #2
0
        private void calculateCosts()
        {
            PageCosts pageCosts = new PageCosts();

            blackWhiteCost = (Convert.ToDecimal(lblBWCostOutput.Content) * totalBlack);
            colourCost = (Convert.ToDecimal(lblColourCostOutput.Content) * totalColour);

            totalCost = blackWhiteCost + colourCost;

            lblTotalBWCostOutput.Content =blackWhiteCost;
            lblTotalColourCostOutput.Content = colourCost;
            lblTotalCostOutput.Content =totalCost;
        }