public ActionResult SepeteEkle(BasketAddDTO entity) { if (SabitlerDTO.KullaniciID > 0) { Basket basket = new Basket(); basket.CustomerID = SabitlerDTO.KullaniciID; basket.ProductID = entity.ProductID; basket.SKU = entity.SKU; basket.Price = entity.Price; basket.Total = entity.SKU * entity.Price; db.Basket.Add(basket); db.SaveChanges(); return(Redirect("http://localhost:62175/home/MutfakDetay/?anakategori=" + ana + "&altkategori=" + alt + "")); } return(null); }
public JsonResult ProfilBilgileriDuzenle(ProfileListDTO entity) { try { var profil = db.user.Where(x => x.user_id == SabitlerDTO.KullaniciID).FirstOrDefault(); profil.user_name = entity.user_name; profil.user_email = entity.user_email; profil.user_password_salt = entity.user_password_salt; profil.city_id = entity.city_id; profil.user_cep = entity.user_cep; db.SaveChanges(); return(Json(profil, JsonRequestBehavior.AllowGet)); } catch (Exception) { return(null); } }
public bool IsLoginSucces(string user, string pas) { user resultUser = db.user.Where(x => x.user_email.Equals(user) && x.user_password_salt.Equals(pas)).FirstOrDefault(); if (resultUser != null) { SabitlerDTO.KullaniciID = resultUser.user_id; SabitlerDTO.KullaniciDURUM = (bool)resultUser.user_status; resultUser.user_create_date = DateTime.Now; db.Entry(resultUser).State = System.Data.Entity.EntityState.Modified; db.SaveChanges(); return(true); } return(false); }