Exemplo n.º 1
0
        public async Task <IActionResult> Edit(int id, [Bind("OppoId,imageName,OppoAciklama,Fiyat")] Oppo oppo)
        {
            if (id != oppo.OppoId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(oppo);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!OppoExists(oppo.OppoId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(oppo));
        }
Exemplo n.º 2
0
        public async Task <IActionResult> Edit(int id, [Bind("XiaomiId,imageName,XiaomiAciklama,Fiyat")] Xiaomi xiaomi)
        {
            if (id != xiaomi.XiaomiId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(xiaomi);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!XiaomiExists(xiaomi.XiaomiId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(xiaomi));
        }
Exemplo n.º 3
0
        public async Task <IActionResult> Edit(int id, [Bind("SamsungId,imageName,SamsungAciklama,SamsungFiyat")] Samsung samsung)
        {
            if (id != samsung.SamsungId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(samsung);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!SamsungExists(samsung.SamsungId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(samsung));
        }
Exemplo n.º 4
0
        public async Task <IActionResult> Edit(int id, [Bind("PersonelId,imageName,PersonelAd,PersonelSoyad,PersonelEmail,PersonelAdres")] Personel personel)
        {
            if (id != personel.PersonelId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(personel);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!PersonelExists(personel.PersonelId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(personel));
        }
Exemplo n.º 5
0
        public async Task <IActionResult> Edit(int id, [Bind("AppleId,imageName,AppleAciklama,Fiyat")] Apple apple)
        {
            if (id != apple.AppleId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(apple);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!AppleExists(apple.AppleId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(apple));
        }
Exemplo n.º 6
0
        public async Task <IActionResult> Edit(int id, [Bind("MudurId,imageName,MudurAd,MudurSoyad,MudurEmail,MudurAdres,PersonelTc,UrunId")] Mudur mudur)
        {
            if (id != mudur.MudurId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(mudur);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!MudurExists(mudur.MudurId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["UrunId"] = new SelectList(_context.Urunlers, "UrunId", "UrunId", mudur.UrunId);
            return(View(mudur));
        }