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

            materie = mat;
            capitol = cap;

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

            questionBox.Text = question[0];

            randomizeAnswers(question);

            correct = question[1];
        }