billing project

visual basic , vb , vb.net Ujjain, India
  • 7 years ago

    Hello friend's, i'm beginner in vb.net 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 
    .Items.Clear() 
    .DisplayMember = "Display Name" 
    For Each CurrentRow As MemorialDataSet.BillRow In CustTable.Rows .Items.Add(CurrentRow.Name) 
    Next 
    End With 
    End Sub 
    Private Sub CustomerList_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load 
    LoadListBox() 
    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).

Contribute

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.

“Some people, when confronted with a problem, think "I know, I’ll use regular expressions." Now they have two problems.” - Jamie Zawinski