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; } } }
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); } }
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(); }
private void btnNextImageQuest_Click(object sender, EventArgs e) { if (TextQuestIsCorrect()) { string Sorgu; //1.Sİ userID, 2.si wordid 3. progressid +1 Sorgu = "CALL UPDATE_LEARN_STATUS(" + userID + "," + g_Sorular[y, 0] + "," + (g_Sorular[y, 1] + 1) + ")"; //öğrenildiyse direkt 6ya atıyoruz if (g_Sorular[y, 1] + 1 == 5) { Sorgu = "CALL UPDATE_LEARN_STATUS(" + userID + "," + g_Sorular[y, 0] + "," + (g_Sorular[y, 1] + 2) + ")"; } MyS.execute(Sorgu); } else { } //y soru dizisinde gezmemizi saglıyor y++; if (y == SoruCount) { this.Close(); } else { g_imageWordID = g_Sorular[y, 0]; getImageQuests gImg = new getImageQuests(g_imageWordID); gImageQuests = gImg; pBAnswerOne.Image = null; pBAnswerTwo.Image = null; pbAnswerThree.Image = null; pbAnswerFour.Image = null; SetDefaultPbBackGroundColor(); BindEmptyPictures(); ResimSorulariBindlama(); ClearRadioBoxes(); } grpImageQuests.Visible = true; grpTextQuest.Visible = false; SetProgressBarValue(++SoruValue); lblSoruIlerlemesi.Text = (SoruValue + 1).ToString() + "/" + (SoruCount * 2).ToString(); }