Exemple #1
0
        public ActionResult CreateUye(ent_UYELER uye)
        {
            BLL_UYELER uyeler = new BLL_UYELER();

            uyeler.SaveUyeler(uye);
            return(RedirectToAction("UyeList", "Uye"));
        }
Exemple #2
0
 public string SaveUyeler(ent_UYELER ent)
 {
     try
     {
         using (DataAccessEntities db = new DataAccessEntities())
         {
             l_uyeler uyeler = new l_uyeler();
             if (ent.uye_id != 0)
             {
                 uyeler = db.l_uyeler.Where(p => p.uye_id == ent.uye_id).First();
             }
             uyeler.uye_ad_soyad      = ent.uye_ad_soyad;
             uyeler.uye_kullanici_adi = ent.uye_kullanici_adi;
             uyeler.uye_sifre         = ent.uye_sifre;
             uyeler.uye_foto_url      = ent.uye_foto_url;
             uyeler.uye_detay         = ent.uye_detay;
             uyeler.uye_kayit_tarihi  = ent.uye_kayit_tarihi;
             uyeler.uye_telefon       = ent.uye_telefon;
             uyeler.uye_mail          = ent.uye_mail;
             uyeler.uye_ispassive     = ent.uye_ispassive;
             if (ent.uye_id == 0)
             {
                 db.l_uyeler.Add(uyeler);
             }
             db.SaveChanges();
         }
         return("success");
     }
     catch (Exception ex)
     {
         return(ex.Message);
     }
 }
Exemple #3
0
        public ent_UYELER SelectUye(int uye_id)
        {
            ent_UYELER result = new ent_UYELER();

            try
            {
                using (DataAccessEntities db = new DataAccessEntities())
                {
                    result = db.Database.SqlQuery <ent_UYELER>("select * from l_uyeler as a where a.uye_id={0}", uye_id).First();
                }
                return(result);
            }
            catch
            {
                return(result);
            }
        }