Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Post
Register
Login
5
Reply
How to get all the details of particular bill in another win
Jyoti Jodha
May 4 2017 5:12 AM
197
Reply
How to get all the details of particular bill in another window when I double click the row of grid view....
public void displayDataGridView()
{
SqlCommand cmd = new SqlCommand("Select ROW_NUMBER() over(ORDER BY Billno ASC) as ID, Billno, Customer_Details.CustName, Date,Amount, Tax_Amount, Total_Amount from MainBillForm join Customer_Details on MainBillForm.Name=Customer_Details.CustID where Sno=0 ", con);
try
{
con.Open();
SqlDataAdapter da = new SqlDataAdapter();
da.SelectCommand = cmd;
DataTable dt = new DataTable();
da.Fill(dt);
dataGridView1.DataSource = dt;
con.Close();
}
catch (Exception ec)
{
MessageBox.Show(ec.Message);
}
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
5
)
Next Recommended Forum
hide previous open forms in windows application
Visual Studio 2012 permium VS Visual studio 2015 Free ?