private void button1_Click(object sender, EventArgs e) { اضافه_مورد sup = new اضافه_مورد(); sup.ShowDialog(); dt = supp.All_sup(); dataGridView1.DataSource = dt; }
private void toolStripMenuItem6_Click(object sender, EventArgs e) { try { presentation_layer.اضافه_مورد n = new presentation_layer.اضافه_مورد(); n.Show(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void button3_Click(object sender, EventArgs e) { اضافه_مورد sup = new اضافه_مورد(); sup.button1.Text = "تعديل"; sup.textBox1.Text = dataGridView1.CurrentRow.Cells[0].Value.ToString(); sup.textBox2.Text = dataGridView1.CurrentRow.Cells[1].Value.ToString(); sup.textBox3.Text = dataGridView1.CurrentRow.Cells[2].Value.ToString(); sup.textBox4.Text = dataGridView1.CurrentRow.Cells[3].Value.ToString(); sup.ShowDialog(); dt = supp.All_sup(); dataGridView1.DataSource = dt; }