Quantcast
Channel: Windows Forms General forum
Viewing all articles
Browse latest Browse all 12583

i am devoloping a samll desktop app.it needs to get a recipt.From billing form to recipt form i am passing values but t am not able get the values into form.see the below code and help to get out of that?

$
0
0

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



Viewing all articles
Browse latest Browse all 12583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>