private void button1_Click(object sender, EventArgs e) { addEdit ad = new addEdit(); ad.ShowDialog(); fill(); }
private void button2_Click(object sender, EventArgs e) { addEdit ad = new addEdit(); ad.Text = "تعديل"; ad.button1.Text = "تعديل"; ad.textBox1.Text = DataGrid.CurrentRow.Cells[0].Value.ToString(); ad.textBox2.Text = DataGrid.CurrentRow.Cells[1].Value.ToString(); ad.textBox3.Text = DataGrid.CurrentRow.Cells[2].Value.ToString(); ad.ShowDialog(); fill(); }