예제 #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            Form17 f = new Form17();

            this.Hide();
            f.ShowDialog();
            Close();
        }
예제 #2
0
        private void button2_Click(object sender, EventArgs e)
        {
            string SqlText = "INSERT INTO [Pasagir] ([ID_Pasagir], [Surname],[Name],[NomerTelefony],[Pasport],[TicketsID],[ReysID]) VALUES (1,1, '01:01:2018','20:40',1,'21:50') ";
            Form17 f       = new Form17(); // створити екземпляр вікна

            if (f.ShowDialog() == DialogResult.OK)
            {
                // сформувати SQL-рядок
                SqlText = "INSERT INTO [Pasagir] ([ID_Pasagir], [Surname],[Name],[NomerTelefony],[Pasport],[TicketsID],[ReysID]) VALUES (";
                SqlText = SqlText + "\'" + f.textBox1.Text + "\', ";
                SqlText = SqlText + "\'" + f.textBox2.Text + "\', ";
                SqlText = SqlText + "\'" + f.textBox3.Text + "\')";
                SqlText = SqlText + "\'" + f.textBox4.Text + "\')";
                SqlText = SqlText + "\'" + f.textBox5.Text + "\')";
                SqlText = SqlText + "\'" + f.textBox6.Text + "\')";


                // виконати SQL-команду
                MyExecuteNonQuery(SqlText);
                // відобразати таблицю Source
                Pasagir();
            }
        }
예제 #3
0
        private void 居民ToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            Form17 fm = new Form17("390");

            fm.ShowDialog();
        }