private void simpleButton1_Click(object sender, EventArgs e) { try { Fonksiyonlar.TBL_KULLANICILAR Kullanici = DB.TBL_KULLANICILARs.First(s => s.KULLANICI == txtKullanici.Text.Trim() && s.SIFRE == txtSifre.Text.Trim()); Kullanici.LASTLOGIN = DateTime.Now; DB.SubmitChanges(); this.Hide(); AnaForm frm = new AnaForm(Kullanici); frm.Show(); } catch (Exception) { MessageBox.Show("Girişi Yapılamadı.\nKullanıcı adı veya şifre hatalı.\n Lütfen kontrol edip tekrar deneyiniz.!\n", "Hata", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } }
private void btnGiris_Click(object sender, EventArgs e) { try { kullanici = DB.tbl_Kullanicis.First(s => s.Kullanici == txtKullanici.Text.Trim() && s.Parola == txtParola.Text.Trim()); kullanici.SonGiris = DateTime.Now; DB.SubmitChanges(); this.Hide(); AnaForm frm = new AnaForm(kullanici); frm.Show(); } catch (Exception ex) { mesaj.Uyari("Hatalı kullanıcı adı veya parola girişi "); log.HataMesajiYaz(ex); } }
private void BtnGiris_Click(object sender, EventArgs e) { try { Fonksiyonlar.TBL_KULLANICILAR Kullanici = DB.TBL_KULLANICILAR.First(s => s.KULLANICI == txtKullanici.Text.Trim() && s.SIFRE == txtSifre.Text.Trim()); Kullanici.LASTLOGIN = DateTime.Now; DB.SubmitChanges(); this.Hide(); AnaForm frm = new AnaForm(Kullanici); frm.Show(); } catch (Exception ex) { MessageBox.Show("Kullancı adı veya şifreniz yanlış!"); return; } //this.Hide(); //AnaForm frm = new AnaForm(); //frm.Show(); }