Example #1
0
        private void frmLogin_Load(object sender, EventArgs e)
        {
            // soruları kouşullara gore guncelledik
            MySQLQuerryExecuter mys = new MySQLQuerryExecuter();
            string sorgu            = "CALL CALC_QUESTABLE_QUESTIONS()";

            mys.execute(sorgu);



            btnUserLogin.Visible = false;
            btnNewUser.Visible   = false;
            lblKontrol.Visible   = false;
            loginBind     db    = new loginBind();
            List <string> users = new List <string>();

            users = db.bindUsers();

            foreach (string item in users)
            {
                if (item == "Admin")
                {
                    continue;
                }
                cmbUsers.Items.Add(item);
            }
        }
Example #2
0
        private void btnEditWord_Click(object sender, EventArgs e)
        {
            MySQLQuerryExecuter MyS = new MySQLQuerryExecuter();

            if (toggleSilGuncelle.Checked == true)
            {
                DialogResult dr = MetroMessageBox.Show(this, "\n\n" + SecilenKelime + " Silinecek onaylıyor musunuz?", "Kelime Silme Onayı", MessageBoxButtons.YesNo, MessageBoxIcon.Error);
                if (dr == DialogResult.Yes)
                {
                    string querryString = "CALL DELETE_WORD_BY_CATEGORY(" + (cmbCategories.SelectedIndex + 1).ToString() + ",'" + SecilenKelime + "')";
                    MyS.execute(querryString);
                    MetroMessageBox.Show(this, "Silindi..!");
                    this.Height = 337;
                    this.Width  = 257;
                }
                else
                {
                }
            }

            else
            {
                DialogResult dr = MetroMessageBox.Show(this, "\n\n" + SecilenKelime + " Güncellenecek onaylıyor musunuz?", "Kelime Güncelleme Onayı", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                if (dr == DialogResult.Yes)
                {
                    string querryString = "CALL UPDATE_WORD_BY_CATEGORY('" + txtNewWord.Text + "'," + (cmbEditCategories.SelectedIndex + 1).ToString() + ",'" + txtNewToTurkish.Text + "','" + txtExmSentence.Text + "','" + txtNewDataPath.Text + "'," + (cmbCategories.SelectedIndex + 1).ToString() + ",'" + SecilenKelime + "')";
                    MyS.execute(querryString);
                    MetroMessageBox.Show(this, "Güncelleme Yapıldı..!");
                    this.Height = 357;
                    this.Width  = 257;
                }
            }
        }
Example #3
0
        private void btnNewUser_Click(object sender, EventArgs e)
        {
            MySQLQuerryExecuter MyS = new MySQLQuerryExecuter();
            string MySQuerry        = "CALL ADD_NEW_USER('" + txtNewUser.Text + "')";

            MyS.execute(MySQuerry);

            getUserID getID = new getUserID();

            this.Hide();
            frmUser frmNew = new frmUser(getID.Data(txtNewUser.Text), txtNewUser.Text);

            frmNew.ShowDialog();
            this.Close();
        }