Esempio n. 1
0
        private void addNewToolStripMenuItem2_Click(object sender, EventArgs e)
        {
            chargesheet frm = new chargesheet();

            frm.MdiParent = this;
            frm.Show();
        }
Esempio n. 2
0
        private void DataGridView3_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (p1 == 0)
            {
                chargesheet r = null;

                foreach (Form f in Application.OpenForms)
                {
                    if (f is chargesheet)
                    {
                        r = (chargesheet)f;
                        break;
                    }
                }

                if (r == null)
                {
                    return;
                }

                DataGridViewRow row = DataGridView3.Rows[e.RowIndex];


                r.label7.Text    = row.Cells[0].Value.ToString();
                r.textBox1.Text  = row.Cells[1].Value.ToString();
                r.comboBox1.Text = row.Cells[2].Value.ToString();

                r.textBox2.Text = row.Cells[3].Value.ToString();
                r.textBox3.Text = row.Cells[4].Value.ToString();
                r.dpdob.Text    = row.Cells[5].Value.ToString();
                r.textBox4.Text = row.Cells[6].Value.ToString();

                r.groupBox1.Enabled = false;

                r.Button5.Enabled = true;
                r.Button6.Enabled = true;
                r.Button2.Enabled = false;

                this.Dispose();
            }
        }