Beispiel #1
0
        private void thêmMớiSảnPhẩmToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FormTTB ftb = new FormTTB();

            this.Close();
            ftb.Show();
        }
Beispiel #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            SqlConnection cnn = new SqlConnection(str);

            cnn.Open();
            string     sql1    = "insert into Kho values(@matb,@sl)";
            SqlCommand command = new SqlCommand(sql1, cnn);

            command.Parameters.AddWithValue("matb", txtTB.Text);
            command.Parameters.AddWithValue("sl", txtNS.Text);
            command.ExecuteNonQuery();
            FormTTB ftb = new FormTTB();

            this.Hide();
            ftb.Show();
        }