private void водителиToolStripMenuItem_Click(object sender, EventArgs e) { vod newForm = new vod(); newForm.Owner = this; newForm.Show(); }
private void button1_Click(object sender, EventArgs e) { vod main = this.Owner as vod; if (main != null) { for (int i = 0; i < main.dataGridView1.RowCount; i++) { main.dataGridView1.Rows[1].Selected = false; for (int j = 0; j < main.dataGridView1.ColumnCount; j++) { if (main.dataGridView1.Rows[i].Cells[j].Value != null) { if (main.dataGridView1.Rows[i].Cells[j].Value.ToString().Contains(tbstr.Text)) { main.dataGridView1.Rows[i].Selected = true; break; } } } } } }
private void button1_Click(object sender, EventArgs e) { Debug.Assert(Owner != null, nameof(Owner) + " != null"); vod main = Owner as vod; if (main != null) { DataRow nRow = main.autoDataSet.Tables[0].NewRow(); nRow[0] = tbinn.Text; nRow[1] = tbfio.Text; nRow[2] = tbad.Text; main.autoDataSet.Tables[0].Rows.Add(nRow); main.vodTableAdapter.Update(main.autoDataSet.vod); main.autoDataSet.Tables[0].AcceptChanges(); main.dataGridView1.Refresh(); tbinn.Text = ""; tbfio.Text = ""; tbad.Text = ""; } }