private void FrmProfil_FormClosing(object sender, FormClosingEventArgs e)
        {
            FrmTeknikServisFormu frm = new FrmTeknikServisFormu();

            frm.Show();
            Dispose();
        }
        private void BttnAnaSayfa_Click(object sender, EventArgs e)
        {
            Hide();
            FrmTeknikServisFormu frm = new FrmTeknikServisFormu();

            frm.Show();
        }
Example #3
0
        private void BttnGirisYap_Click(object sender, EventArgs e)
        {
            if (String.IsNullOrWhiteSpace(TxtKullaniciAdi.Text) || String.IsNullOrWhiteSpace(TxtSifre.Text))
            {
                MessageBox.Show(Resources.kullaniciAdiveSifreBos, SMF.UygulamaAdi, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
            try
            {
                SMF.Baglanti.Open();
                MySqlCommand     komutKullaniciVarMi = new MySqlCommand("SELECT * FROM kullanicilar", SMF.Baglanti);
                DataTable        dataTable1          = new DataTable();
                MySqlDataAdapter dataAdapter1        = new MySqlDataAdapter(komutKullaniciVarMi);
                dataAdapter1.Fill(dataTable1);

                if (dataTable1.Rows.Count == 0)
                {
                    MessageBox.Show(Resources.kayitliKullaniciYok, SMF.UygulamaAdi, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    BttnYeniKullaniciOluştur.Text = Resources.BttnYeniKullaniciOluştur;
                    _sifremiUnuttumTiklandiMi     = false;
                    KullaniciOlusturGoster();
                }
                else
                {
                    MySqlCommand cmd = new MySqlCommand("SELECT * FROM kullanicilar WHERE KullaniciAdi=@KullaniciAdi AND Sifre=@Sifre", SMF.Baglanti);
                    cmd.Parameters.AddWithValue("@KullaniciAdi", TxtKullaniciAdi.Text);
                    cmd.Parameters.AddWithValue("@Sifre", TxtSifre.Text);
                    DataTable        dataTable2   = new DataTable();
                    MySqlDataAdapter dataAdapter2 = new MySqlDataAdapter(cmd);
                    dataAdapter2.Fill(dataTable2);

                    if (dataTable2.Rows.Count > 0)
                    {
                        FrmTeknikServisFormu frm = new FrmTeknikServisFormu();
                        frm.Show();
                        Hide();
                    }
                    else
                    {
                        MessageBox.Show(Resources.kullaniciAdiveSifreYanlis, SMF.UygulamaAdi, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    }
                }
                SMF.Baglanti.Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, Resources.Hata);
            }
        }
 private void TlStrpMenuItemAraclarYeniKayit_Click(object sender, EventArgs e)
 {
     _frm.Show();
     Hide();
 }