Created
January 12, 2018 09:38
-
-
Save sajjadjaved01/968838d0b6bd1e51134b53f12c657cd5 to your computer and use it in GitHub Desktop.
report
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
var con = new MySqlConnection( | |
"server=localhost;userid=root;password=admin;database=POS_DB;persistsecurityinfo=True;"); | |
var cmd = new MySqlCommand( | |
"Select DISTINCT Sales.InvoiceNo, Sales.CustomerID, Sales.GrandTotal, Sales.TotalPayment, Sales.PaymentDue, Sales.InvoiceDate, ProductSold.ConfigID, ProductSold.ProductName, ProductSold.Quantity, ProductSold.Price, ProductSold.TotalAmount " + | |
"From ProductSold, Sales, Branch " + | |
"Where Sales.InvoiceNo='INV-559216' And branch.BranchID='1'", con); | |
var sqlData = new MySqlDataAdapter { SelectCommand = cmd }; | |
sqlData.Fill(set, "Sales"); | |
sqlData.Fill(set, "ProductSold"); | |
sqlData.Fill(set, "Branch"); | |
var receipt = new SaleRecipt(); | |
receipt.Refresh(); | |
receipt.SetDataSource(set); | |
RptViewer.Instance.crystal.ReportSource = receipt; | |
RptViewer.Instance.ShowDialog(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment