Dim row As DataRow = GridView1.GetDataRow(GridView1.FocusedRowHandle) Me.Cursor = Cursors.WaitCursor Dim objRpt As New XtraReport1 Dim ds As New SalesInvoiceDataSet Dim adp1 As New SqlClient.SqlDataAdapter("Select * From SalesInvoiceDetails Where InvoiceNo=N'" & row("InvoiceNo") & "'", DAL.OpenSqlConnection) adp1.Fill(ds, "SalesInvoiceDetails") Dim adp2 As New SqlClient.SqlDataAdapter("Select * From SalesInvoicesInventoryRowDetails Where InvoiceNo=N'" & row("InvoiceNo") & "' order by Sno", DAL.OpenSqlConnection) adp2.Fill(ds, "SalesInvoicesInventoryRowDetails") DAL.CloseConnection() objRpt.DataSource = ds Dim s As New SalesInvoicePrintForm s.DocumentViewer1.DocumentSource = objRpt s.Show()
Dim adp1 As New SqlClient.SqlDataAdapter("Select * From SalesInvoiceDetails Where InvoiceNo=N'" & row("InvoiceNo") & "'", DAL.OpenSqlConnection)
Dim adp1 As New SqlClient.SqlDataAdapter("Select * From SalesInvoiceDetails Where InvoiceNo=@InvoiceNo", DAL.OpenSqlConnection) adp1.SelectCommand.Parameters.AddWithValue("@InvoiceNo", row("InvoiceNo")) adp1.Fill(ds, "SalesInvoiceDetails") Dim adp2 As New SqlClient.SqlDataAdapter("Select * From SalesInvoicesInventoryRowDetails Where InvoiceNo=@InvoiceNo order by Sno", DAL.OpenSqlConnection) adp1.SelectCommand.Parameters.AddWithValue("@InvoiceNo", row("InvoiceNo")) adp2.Fill(ds, "SalesInvoicesInventoryRowDetails")
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)