public Tuple <string, string, long> bilgigetir(string dısardanemail) { using (var ctx = new KargaASP()) { //Get student name of string type string ad = ctx.Database.SqlQuery <string>("Select ad from Kullanicis where email=@id", new SqlParameter("@id", dısardanemail)).FirstOrDefault(); string soyad = ctx.Database.SqlQuery <string>("Select soyad from Kullanicis where email=@id", new SqlParameter("@id", dısardanemail)).FirstOrDefault(); long tel = 0123456789; //Convert.ToInt64(ctx.Database.SqlQuery<string>("Select tel from Kullanicis where email=@id", new SqlParameter("@id", dısardanemail)).FirstOrDefault()); return(Tuple.Create(ad, soyad, tel)); } }
public string sifremiUnuttum(string email) { using (var ctx = new KargaASP()) { string studentName = ctx.Database.SqlQuery <string>("Select ad from Kullanicis where email=@id", new SqlParameter("@id", email)).FirstOrDefault(); if (studentName == null) { return("Kayıtlı değilsiniz"); } else { return(studentName); } } }
public string giris(string email, string sifre) { using (var ctx = new KargaASP()) { //Get student name of string type string studentName = ctx.Database.SqlQuery <string>("Select ad from Kullanicis where email=@id", new SqlParameter("@id", email)).FirstOrDefault(); if (studentName == null) { return("mailiniz sistemde yok"); } string mailsifreuygun = ctx.Database.SqlQuery <string>("select ad from Kullanicis where email=@mail and sifre=@sifre ", new SqlParameter("@mail", email), new SqlParameter("@sifre", sifre)).FirstOrDefault(); if (mailsifreuygun == null) { return("sifre hatali"); } giris_durumu = 1; gorunmezyap(sidenavsag); mevut_kullanıcı_mail = mailsifreuygun; return("Giriş işlemi başarılı"); } return("E-mail veya şifre yanlış"); }