Click here to Skip to main content
15,915,336 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
the purchased items should be added to datagridview control for report generation and to print the bill
Posted

If you could get the code for your project/task on CP without even caring to atleast explain in detail, thn it should be Code Porject who should get your pay check/payment from your client.
On a more serious note, this is a community where like you every one else works and tries to help other people when they have doubts. This is definitly not a place where you can Rent A Coder
 
Share this answer
 
Comments
walterhevedeich 28-Jul-11 5:56am    
Well said.
If your are familiar with ms access, make a database in access; for example db1.mdb.
then make a table on it : purchaseditems whit 2 fields: name (text) and price (number)

then make a vb.net project, add a datagridview to the form and use this code:
Imports System.Data
Imports System.Data.OleDb
Public Class Form1
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim con As OleDbConnection
        Dim cm As OleDbCommand
        Dim StrSql As String
        Dim da As OleDbDataAdapter
        Dim ds As New DataSet
        con = New OleDbConnection("provider=Microsoft.jet.OLEDB.4.0; data source=" + CurDir() + "\db1.mdb")
        con.Open()
        StrSql = "insert into purchaseditems (name,price) values ('book',65)"
        cm = New OleDbCommand(StrSql, con)
        cm.ExecuteNonQuery()
        StrSql = "select * from purchaseditems"
        da = New OleDbDataAdapter(StrSql, con)
        da.Fill(ds, "purchaseditems")
        Me.DataGridView1.DataSource = ds.Tables("purchaseditems")
        con.Close()
    End Sub
End Class
 
Share this answer
 
Comments
Dalek Dave 28-Jul-11 7:26am    
Good answer.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900