private void UpData_Click(object sender, EventArgs e) { var k = dataGridView1.CurrentRow.Index; int u = 0; for (int i = 0; i < ComboCabina.Items.Count; i++) { if (ComboCabina.Items[i].ToString() == dataGridView1.CurrentRow.Cells[3].Value.ToString()) { u = i; break; } } AddCabina frm = new AddCabina(); AddCabina.NumCentral = pr.GetNumber(dataGridView1.CurrentRow.Cells[0].Value.ToString()); frm.CabinaCabel.Text = dataGridView1.CurrentRow.Cells[3].Value.ToString(); frm.tetarea.Text = dataGridView1.CurrentRow.Cells[6].Value.ToString(); frm.combocent.Items.Clear(); frm.combocent.Items.Add(dataGridView1.CurrentRow.Cells[0].Value.ToString()); frm.combocent.Text = dataGridView1.CurrentRow.Cells[3].Value.ToString(); frm.Text = "تعديل بيانات الكبينة"; frm.button1.Text = "تحديث"; frm.CabinaCabel.ReadOnly = true; AddCabina.NumCabina = pr.CabinaExisting(Numcent.ToString() + dataGridView1.CurrentRow.Cells[3].Value.ToString()); frm.ShowDialog(); dataGridView1.Rows.RemoveAt(k); ComboCabina.Items.RemoveAt(u); area.Clear(); }
private void اضافهكابينةToolStripMenuItem_Click(object sender, EventArgs e) { AddCabina frm = new AddCabina(); frm.ShowDialog(); }