this code in feepanel
else if (comboBox1.SelectedItem.ToString() == "Annuval Fee"){
con.Open();
string query = "insert into annualfeetable values('" + textBox1.Text + "','" + DateTime.Now.ToString() + "','" + textBox3.Text + "','" + textBox2.Text + "','" + textBox5.Text + "','" + comboBox4.SelectedItem.ToString() + "','" + textBox7.Text + "','" + textBox8.Text + "','" + textBox9.Text + "')";
int q = db2.insertquery(query, con);
if (q == 1)
{
con.Close();
DialogResult drr= MessageBox.Show("Inserted Secussfully","are you want print recipt",MessageBoxButtons.YesNo);
if (drr == DialogResult.Yes)
{
Form4 f4 = new Form4();
f4.Show();
f4.Print(admnum, class1, studentname, parentname, amount, feetype);
}
}
}
this code in form4 that is print panel
static void Print(string admnum, string class1, string studentname, string parentname, string amount, string feetype){
label8.Text = studentname;
label47.Text = parentname;
label17.Text = class1;
label22.Text = amount;
label26.Text = "2012-2013";
}
so help in coding that value
krish