// [Authorize]
        public ActionResult OduncGuncelle(TBLHareket p)
        {
            var hrktgnc = dr.TBLHareket.Find(p.ID);

            hrktgnc.UyeGetirTarih = p.UyeGetirTarih;
            hrktgnc.islemDurum    = true;
            dr.SaveChanges();
            return(RedirectToAction("Index"));
        }
        // [Authorize]
        public ActionResult Odunciade(TBLHareket p)
        {
            // Bu alttaki kodlar kişinin ne zaman kitabı iade ettigini gösterir.
            //

            var      odnciade = dr.TBLHareket.Find(p.ID);
            DateTime d1       = DateTime.Parse(odnciade.IadeTarih.ToString());
            DateTime d2       = Convert.ToDateTime(DateTime.Now.ToShortDateString());
            TimeSpan d3       = d2 - d1;

            ViewBag.dgr = d3.TotalDays;
            ; return(View("Odunciade", odnciade));
        }
        public ActionResult OduncVer(TBLHareket p)
        {
            var d1 = dr.TBLUyeler.Where(s => s.ID == p.TBLUyeler.ID).FirstOrDefault();
            var d2 = dr.TBLKitap.Where(t => t.ID == p.TBLKitap.ID).FirstOrDefault();
            var d3 = dr.TBLPersonel.Where(k => k.ID == p.TBLPersonel.ID).FirstOrDefault();

            p.TBLUyeler   = d1;
            p.TBLKitap    = d2;
            p.TBLPersonel = d3;
            dr.TBLHareket.Add(p);
            dr.SaveChanges();
            //return View();
            return(RedirectToAction("Index"));
        }