Esempio n. 1
0
        public async Task <IActionResult> Edit(int id, [Bind("videokeId,songNumber,title,artist,description")] Kod kod)
        {
            if (id != kod.videokeId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(kod);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!KodExists(kod.videokeId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(kod));
        }
 public IQueryable <BaseType.Kitap> KodQuery(IQueryable <BaseType.Kitap> queryable)
 {
     if (!string.IsNullOrEmpty(Kod))
     {
         return(queryable.Where(s => s.Kod.Trim() == Kod.Trim()));
     }
     return(queryable);
 }
Esempio n. 3
0
 public override int GetHashCode()
 {
     unchecked
     {
         int result = 14;
         result = 29 * result + Naziv.GetHashCode();
         result = 29 * result + Kod.GetHashCode();
         return(result);
     }
 }
Esempio n. 4
0
        public async Task <IActionResult> Create([Bind("videokeId,songNumber,title,artist,description")] Kod kod)
        {
            if (ModelState.IsValid)
            {
                _context.Add(kod);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(kod));
        }
Esempio n. 5
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (Kod?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ Kurz.GetHashCode();
         hashCode = (hashCode * 397) ^ (Mena?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ Mnozstvi;
         hashCode = (hashCode * 397) ^ (Zeme?.GetHashCode() ?? 0);
         return(hashCode);
     }
 }