public IActionResult Index()
        {
            var musteriId = HttpContext.Session.GetInt32("musteriid");

            if (musteriId == null)
            {
                return(RedirectToAction("index", "giris"));
            }

            var musteriIslemleri = new MusteriIslemleri(musteriId.Value);
            var musteriModel     = musteriIslemleri.Sorgula();
            var musteriBakiye    = musteriIslemleri.BakiyeHesapla();

            ViewBag.Bakiye = musteriBakiye;
            Dictionary <Hesap, Decimal> hesapBakiye = new Dictionary <Hesap, Decimal>();
            var hesapList = HesapIslemleri.Sorgula_musteriId(musteriId.Value);

            foreach (var item in hesapList)
            {
                var islem = new HesapIslemleri(item.Id);

                hesapBakiye.Add(item, islem.BakiyeHesapla());
            }

            ViewBag.HesapListesi = hesapBakiye;

            return(View(musteriModel));
        }
Example #2
0
        public IActionResult Index(int id)
        {
            var musteriId = HttpContext.Session.GetInt32("musteriid");

            if (musteriId == null)
            {
                return(RedirectToAction("index", "giris"));
            }


            var hesap          = HesapIslemleri.Sorgula_hesapId(id);
            var hesapIslemleri = new HesapIslemleri(id);

            var hesapBakiye = hesapIslemleri.BakiyeHesapla();

            ViewBag.Bakiye = hesapBakiye;
            return(View(hesap));
        }