Ejemplo n.º 1
0
        private void водителиToolStripMenuItem_Click(object sender, EventArgs e)
        {
            vod newForm = new vod();

            newForm.Owner = this;
            newForm.Show();
        }
Ejemplo n.º 2
0
        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;
                            }
                        }
                    }
                }
            }
        }
Ejemplo n.º 3
0
        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  = "";
            }
        }