Example #1
0
        //Dislays the cummulative summary of all the drivers of company.
        private void SummaryButton_Click(object sender, EventArgs e)
        {
            SummaryGroupBox.Visible   = true;
            DetailsGroupBox.Visible   = false;
            CalculateGroupBox.Visible = false;

            //String conversion and currency formatting is done.
            TotalDriverDisplayLabel.Text      = TotalDrivers.ToString();
            SummaryTotalPassengerDisplay.Text = TotalPassengers.ToString();
            SummaryTotalReceiptDisplay.Text   = TotalReceipts.ToString("C", new CultureInfo("en-FR"));
            SummaryAvgReceiptDisplay.Text     = (TotalReceipts / TotalPassengers).ToString("C", new CultureInfo("en-FR"));
        }
Example #2
0
 //Displays Summary of all company drivers.
 private void SummaryButton_Click(object sender, EventArgs e)
 {
     SummaryNoOfDriverDisplayLabel.Text = TotalDrivers.ToString();
     //Changes the visibility and enable status.
     DetailsGroupBox.Visible   = false;
     DetailsGroupBox.Enabled   = true;
     SummaryGroupBox.Visible   = true;
     CalculateGroupBox.Visible = false;
     //Displays the calculates values.
     SummaryTotalPassengerDisplayLabel.Text = TotalPassengers.ToString();
     SummaryTotalReceiptsDisplayLabel.Text  = TotalReceipts.ToString();
     SummaryAvgReceiptsDisplayLabel.Text    = (TotalReceipts / TotalPassengers).ToString("c", new CultureInfo("en-FR"));
 }