private void button1_Click(object sender, EventArgs e) { // RePrinting the bill whose data is already in database try { if (mTextBox1.Text != "" && mTextBox2.Text != "") { if (checkBox1.Checked == false) // { frmPrint xyz = new frmPrint(mTextBox1.Text, mTextBox2.Text, "Single"); xyz.ShowDialog(); } else { frmPrint xyz = new frmPrint(mTextBox1.Text, mTextBox2.Text, "Cash"); xyz.ShowDialog(); } } else { MessageBox.Show("Empty fields."); } } catch (Exception ex) { MessageBox.Show(ex.Message.ToString()); } this.Close(); }
private void settle_b_Click(object sender, EventArgs e) { try { if (label22.Text != "") { if (checkBox1.Checked == false) // { insert_accountdetails(); //inserting bill info for each insert_account(); // inserting account transactions personal frmpicture_form picForm = new frmpicture_form(textBox1.Text, label22.Text, "Single"); picForm.ShowDialog(); frmPrint xyz = new frmPrint(textBox1.Text, label22.Text, "Single"); xyz.ShowDialog(); } else { insert_Caccounts(); frmpicture_form picForm = new frmpicture_form(textBox1.Text, label22.Text, "Cash"); picForm.ShowDialog(); frmPrint xyz = new frmPrint(textBox1.Text, label22.Text, "Cash"); xyz.ShowDialog(); } } else { return; } } catch (Exception ex) { MessageBox.Show(ex.Message.ToString()); } }