Skip to content

Vb.net Billing Software — Source Code

The final piece is printing. Using the PrintDocument component from the toolbox:

End Class

When you download a generic "vb.net billing software source code" from GitHub or a code repository, you will need to make modifications: vb.net billing software source code

: A more robust system using SQL Server that handles products, categories, purchase orders, and sales reports. The final piece is printing

Private Sub btnAddProduct_Click(sender As Object, e As EventArgs) Handles btnAddProduct.Click Try OpenDB() Dim query As String = "INSERT INTO tbl_Product (ProductCode, ProductName, Unit, SellingPrice, GST_Percent, StockQuantity) VALUES (@code, @name, @unit, @price, @gst, @stock)" cmd = New SqlCommand(query, conn) cmd.Parameters.AddWithValue("@code", txtCode.Text) cmd.Parameters.AddWithValue("@name", txtName.Text) cmd.Parameters.AddWithValue("@unit", cmbUnit.Text) cmd.Parameters.AddWithValue("@price", Convert.ToDecimal(txtPrice.Text)) cmd.Parameters.AddWithValue("@gst", Convert.ToDecimal(txtGST.Text)) cmd.Parameters.AddWithValue("@stock", Convert.ToDecimal(txtStock.Text)) cmd.ExecuteNonQuery() MessageBox.Show("Product saved successfully.") LoadProductsDataGrid() Catch ex As Exception MessageBox.Show("Error: " & ex.Message) Finally CloseDB() End Try End Sub StockQuantity) VALUES (@code