/// <summary> /// </summary> /// <returns>View</returns> public ActionResult Odeme() { var list = CurrentUser.SepetItem.Where(x => x.Aktif); var toplamucret = list.Sum(x => _urunUrunRepository.GetDiscountPrice(x.Urun.Id).Fiyat *x.Miktar); if (toplamucret <= 0) { return(RedirectToAction("Index")); } var model = new OdemeModel { ToplamUcret = toplamucret, CurrentUser = CurrentUser }; return(View(model)); }
public ActionResult Detay(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } var urun = _urunRepository.GetDiscountPrice(id.Value); if (urun == null) { return(new HttpStatusCodeResult(HttpStatusCode.NotFound)); } if (!_urunRepository.IsAvailable(urun)) { return(new HttpStatusCodeResult(HttpStatusCode.NotFound)); } return(View(urun)); }