public async Task <ActionResult> DeleteConfirmed(int id)
        {
            StoktakiUrunler stoktakiurunler = await db.StoktakiUrunler.FindAsync(id);

            db.StoktakiUrunler.Remove(stoktakiurunler);
            await db.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
        public async Task <ActionResult> Edit([Bind(Include = "UrunStok_id,UrunAlisFiyati,UrunTur_id,UrunAdi,UrunAdet")] StoktakiUrunler stoktakiurunler)
        {
            if (ModelState.IsValid)
            {
                db.Entry(stoktakiurunler).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            ViewBag.UrunTur_id = new SelectList(db.GenelUrunler, "Urun_id", "Urun_adi", stoktakiurunler.UrunTur_id);
            return(View(stoktakiurunler));
        }
        public async Task <ActionResult> Create([Bind(Include = "UrunStok_id,UrunAlisFiyati,UrunTur_id,UrunAdi,UrunAdet")] StoktakiUrunler stoktakiurunler)
        {
            if (ModelState.IsValid)
            {
                stoktakiurunler.UrunGirisTarihi = DateTime.Now;
                db.StoktakiUrunler.Add(stoktakiurunler);
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }

            ViewBag.UrunTur_id = new SelectList(db.GenelUrunler, "Urun_id", "Urun_adi", stoktakiurunler.UrunTur_id);
            return(View(stoktakiurunler));
        }
        // GET: /StoktakiUrunler/Details/5
        public async Task <ActionResult> Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            StoktakiUrunler stoktakiurunler = await db.StoktakiUrunler.FindAsync(id);

            if (stoktakiurunler == null)
            {
                return(HttpNotFound());
            }
            return(View(stoktakiurunler));
        }
        // GET: /StoktakiUrunler/Edit/5
        public async Task <ActionResult> Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            StoktakiUrunler stoktakiurunler = await db.StoktakiUrunler.FindAsync(id);

            if (stoktakiurunler == null)
            {
                return(HttpNotFound());
            }
            ViewBag.UrunTur_id = new SelectList(db.GenelUrunler, "Urun_id", "Urun_adi", stoktakiurunler.UrunTur_id);
            return(View(stoktakiurunler));
        }