Exemplo n.º 1
0
 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();
 }
Exemplo n.º 2
0
 private void deleteAllButton_Click(object sender, EventArgs e)
 {
     DBConnect dbconnect = new DBConnect();
     dbconnect.DeleteAll();
     Owner.Show();
     this.Close();
 }
Exemplo n.º 3
0
        public QuestionAsker(string mat, string cap)
        {
            InitializeComponent();
            DBConnect dbconnect = new DBConnect();

            materie = mat;
            capitol = cap;

            reinitialize();
        }
Exemplo n.º 4
0
        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);
            });
        }
Exemplo n.º 5
0
        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);
                });
        }
Exemplo n.º 6
0
 private void restoreButton_Click(object sender, EventArgs e)
 {
     DBConnect dbconnect = new DBConnect();
     dbconnect.Restore();
 }
Exemplo n.º 7
0
 private void backupButton_Click(object sender, EventArgs e)
 {
     DBConnect dbconnect = new DBConnect();
     dbconnect.Backup();
 }
Exemplo n.º 8
0
        private void reinitialize()
        {
            DBConnect dbconnect = new DBConnect();
            string[] question = dbconnect.SelectRandom(materie, capitol);

            questionBox.Text = question[0];

            randomizeAnswers(question);

            correct = question[1];
        }