Results 1 to 4 of 4

Thread: This is a test.

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2006
    Posts
    22

    This is a test.

    VB Code:
    1. Private Sub customerButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles customerButton.Click
    2.         If Me.DatesOK Then
    3.             Dim box1 As TextBox
    4.             Me.FromDate = Convert.ToDateTime(Me.fromText.Text)
    5.             Me.toDate = Convert.ToDateTime(Me.toText.Text)
    6.             'Me.ClearReports()
    7.             Reports1.custName((Reports1.numCustomers + 1)) = "Unknown"
    8.             Dim reader As New System.IO.StreamReader(Reports1.transFileName)
    9.             Do While (reader.Peek > -1)
    10.                 Reports1.oneLine = reader.ReadLine
    11.                 Reports1.valsRead = Reports1.oneLine.Split(New Char() {"~"c})
    12.                 If ((DateTime.Compare(Convert.ToDateTime(Reports1.valsRead(4)), Me.FromDate) >= 0) And (DateTime.Compare(Convert.ToDateTime(Reports1.valsRead(4)), Me.toDate) <= 0)) Then
    13.                     Me.N = Me.findCustomer(Reports1.valsRead(1))
    14.                     Dim num2 As Integer = Me.N
    15.                     Me.numOfSales(num2) += 1
    16.                     num2 = Me.N
    17.                     Me.totalSales(num2) = Decimal.Add(Me.totalSales(num2), Convert.ToDecimal(Reports1.valsRead(3)))
    18.                 End If
    19.             Loop
    20.             reader.Close()
    21.             Me.heading.Text = ("Customer".PadRight(20) & "  Units Sold" & "Revenue".PadLeft(13))
    22.             Dim num1 As Integer = (Reports1.numCustomers + 1)
    23.             Me.N = 1
    24.             Do While (Me.N <= num1)
    25.                 box1 = Me.reportText
    26.                 Dim textArray As String() = New String() {box1.Text, Reports1.custName(Me.N).PadRight(20), Me.numOfSales(Me.N).ToString("n0").PadLeft(10), Me.totalSales(Me.N).ToString("c2").PadLeft(15), ChrW(13) & ChrW(10)}
    27.                 box1.Text = String.Concat(textArray)
    28.                 Me.totalNumOfSales = (Me.totalNumOfSales + Me.numOfSales(Me.N))
    29.                 Me.totalDollarSales = Decimal.Add(Me.totalDollarSales, Me.totalSales(Me.N))
    30.                 Me.N += 1
    31.             Loop
    32.             box1 = Me.reportText
    33.             box1.Text = (box1.Text & "  Totals".PadRight(20) & Me.totalNumOfSales.ToString("n0").PadLeft(10) & Me.totalDollarSales.ToString("c2").PadLeft(15))
    34.         End If
    35.  
    36.     End Sub
    I am using Visual Studio .NET 2003/.NET Framework 1.1

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: This is a test.

    Moved to test forum.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Feb 2006
    Posts
    22

    Re: This is a test.

    Oops, sorry, I meant to put this in the test forum, but put it in here by accident somehow.
    I am using Visual Studio .NET 2003/.NET Framework 1.1

  4. #4
    Fanatic Member kregg's Avatar
    Join Date
    Feb 2006
    Location
    UK
    Posts
    524

    Re: This is a test.

    w00t! free c0d3!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width