Пример #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            this.Hide();
            ProviderCorrect pcf = new ProviderCorrect();

            pcf.Show();
        }
Пример #2
0
        private void btn_delete_Click(object sender, EventArgs e)
        {
            SqlConnection sqlConnection = new SqlConnection(@"Data Source=NOUT;Initial Catalog=Phapm;Integrated Security=True");
            SqlCommand    sqlCommand    = new SqlCommand();

            sqlCommand.Connection = sqlConnection;
            sqlConnection.Open();
            sqlCommand.CommandText = "DELETE FROM PROVIDERS WHERE Name = '" + comboBox1.Text + "'";
            sqlCommand.ExecuteNonQuery();
            sqlConnection.Close();

            MessageBox.Show("User '" + comboBox1.Text + "' is deleted!", "Info");

            this.Hide();
            ProviderCorrect pcf = new ProviderCorrect();

            pcf.Show();
        }
Пример #3
0
        private void button2_Click(object sender, EventArgs e)
        {
            SqlCommand    cmd;
            SqlConnection con;

            con = new SqlConnection(@"Data Source=NOUT;Initial Catalog=Phapm;Integrated Security=True");
            con.Open();
            cmd = new SqlCommand("INSERT INTO PROVIDERS (NAME, PHONE) VALUES (@name, @phone)", con);
            cmd.Parameters.AddWithValue("@name", textBox1.Text);
            cmd.Parameters.AddWithValue("@phone", textBox2.Text);
            cmd.ExecuteNonQuery();

            MessageBox.Show("User '" + textBox1.Text + "' with phone nomber '" + textBox2.Text + "' is added!", "Info");

            this.Hide();
            ProviderCorrect pcf = new ProviderCorrect();

            pcf.Show();
        }
Пример #4
0
        private void btn_AddProv_Click(object sender, EventArgs e)
        {
            ProviderCorrect prAdd = new ProviderCorrect();

            prAdd.Show();
        }