billing project

visual basic , vb , Ujjain, India
  • 9 years ago

    Hello friend's, i'm beginner in and creating a billing project. In that i have two forms : Customer List and Customer Bill. In Customer List i added a listbox Control and a button, when the form loads it's display the customer list from the database. so i want that when i double click on the listbox or click on the show cust. details button after selecting customer. it's display the customer bill with all relevant field in the database in the bill table. the code of Customer List Load event are: Code:

    Private Sub LoadListBox() 
    Dim custAdaptor As New MemorialDataSetTableAdapters.BillTableAdapter 
    Dim CustTable As New MemorialDataSet.BillDataTable custAdaptor.Fill(CustTable) 
    With lstCustomer 
    .DisplayMember = "Display Name" 
    For Each CurrentRow As MemorialDataSet.BillRow In CustTable.Rows .Items.Add(CurrentRow.Name) 
    End With 
    End Sub 
    Private Sub CustomerList_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load 
    End Sub

    nd show details button code are: Code: Private Sub btnShowDetails_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnShowDetails.Click If lstCustomer.SelectedItems.Count = 1 Then 'confusion here how to load the details in bill form. Else If lstCustomer.SelectedItems.Count = 0 Then MessageBox.Show("You have to Select a Customer to display the details") Else MessageBox.Show("You have Selected too many Customers") End If End If CustomerBill.Show() End Sub so when i click on show details button it redirect to bill form and display the result. but in vb only event and raiseEvent work not redirection. so plz help me. to solve this. or plz give me a link that have solution for this. thank you

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Anyone who considers arithmetic methods of producing random digits is, of course, in a state of sin.” - John von Neumann