private void button1_Click(object sender, EventArgs e) { ministatement mns = new ministatement(); mns.Show(); mns.label2.Text = label2.Text; mns.label4.Text = label4.Text; }
public partial class ministatement : Form { SqlConnection connect = new SqlConnection(@"data source=ABHINAV-PC\ABHI;integrated security=true;initial catalog=ATM;"); public ministatement() { InitializeComponent(); } private void ministatement_Load(object sender, EventArgs e) { connect.Open(); SqlCommand cmd = new SqlCommand("select * from transactions where account_no='" + label4.Text.Trim().ToString() +"'" , connect); DataTable dth = new DataTable(); SqlDataAdapter da = new SqlDataAdapter(cmd); da.Fill(dth); dataGridView1.DataSource = dth; } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)