private void button1_Click(object sender, EventArgs e) { DBConnect dbconnect = new DBConnect(); dbconnect.Insert(enuntText.Text, textBox2.Text, textBox3.Text, textBox4.Text, materieText.Text, capitolText.Text); Owner.Show(); this.Close(); }
private void deleteAllButton_Click(object sender, EventArgs e) { DBConnect dbconnect = new DBConnect(); dbconnect.DeleteAll(); Owner.Show(); this.Close(); }
public QuestionAsker(string mat, string cap) { InitializeComponent(); DBConnect dbconnect = new DBConnect(); materie = mat; capitol = cap; reinitialize(); }
private void deleteButton_Click(object sender, EventArgs e) { DBConnect dbconnect = new DBConnect(); dbconnect.Delete(comboBox1.SelectedItem.ToString()); comboBox1.Items.Clear(); dbconnect.Select(string.Empty, string.Empty)[0].ForEach(delegate(string enunt) { comboBox1.Items.Add(enunt); }); }
public SelectDelete() { InitializeComponent(); comboBox1.AutoCompleteMode = AutoCompleteMode.Suggest; comboBox1.AllowDrop = true; DBConnect dbconnect = new DBConnect(); dbconnect.Select(string.Empty, string.Empty)[0].ForEach(delegate(string enunt) { comboBox1.Items.Add(enunt); }); }
private void restoreButton_Click(object sender, EventArgs e) { DBConnect dbconnect = new DBConnect(); dbconnect.Restore(); }
private void backupButton_Click(object sender, EventArgs e) { DBConnect dbconnect = new DBConnect(); dbconnect.Backup(); }
private void reinitialize() { DBConnect dbconnect = new DBConnect(); string[] question = dbconnect.SelectRandom(materie, capitol); questionBox.Text = question[0]; randomizeAnswers(question); correct = question[1]; }