public static string Login(string KAd, string Sifre) { try { using (DBOtelEntities db = new DBOtelEntities()) { KullaniciId kI = new KullaniciId(); var kullanici = (from k in db.tblKullanicilar where k.kullaniciID == KAd && k.kullaniciSifre == Sifre select k).SingleOrDefault(); if (kullanici != null) { kI.setKullanici(kullanici.kullaniciID); return("Yes"); } else { return("No"); } } } catch (Exception e) { return(e.Message); } }
public static string Login(string KAd, string Sifre) { try { using (DBOtelEntities db = new DBOtelEntities()) { KullaniciId kI = new KullaniciId(); var kullanici = (from k in db.tblKullanicilar where k.kullaniciID == KAd && k.kullaniciSifre == Sifre select k).SingleOrDefault(); if (kullanici != null) { kI.setKullanici(kullanici.kullaniciID); return "Yes"; } else { return "No"; } } } catch (Exception e) { return e.Message; } }
private void btnKaydet_Click(object sender, EventArgs e) { RezervasyonView RV = new RezervasyonView(); MusteriView MV = new MusteriView(); KartView KV = new KartView(); KullaniciId KI = new KullaniciId(); DateTime baslangic; DateTime bitis; DateTime KartSonKullanma; string ad, soyad, eposta, kartnumarasi, kartAd, guvenlikKodu; baslangic = dateTimePicker1.Value.Date; bitis = dateTimePicker2.Value.Date; RV.BaslangicTarihi = baslangic; RV.BitisTarihi = bitis; RV.RezervasyonOlusturmaTarihi = DateTime.Now.Date; ad = txtMusteriAd.Text; soyad = txtMusteriSoyad.Text; eposta = txtMusteriHesap.Text; MV.MusteriAd = ad; MV.MusteriSoyad = soyad; MV.MusteriEPosta = eposta; MV.KullaniciId = KI.getKullanici(); kartnumarasi = txtKartNo.Text; kartAd = txtKartAd.Text; guvenlikKodu = txtGuvenlikKod.Text; KartSonKullanma = dateSonKullanma.Value; }