public async Task <IActionResult> Edit(string id, [Bind("Voucherno,InputDate,StudentId,Headname,Amount")] Fee fee)
        {
            if (id != fee.Voucherno)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(fee);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!FeeExists(fee.Voucherno))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["StudentId"] = new SelectList(_context.Student, "Id", "Id", fee.StudentId);
            return(View(fee));
        }
 public async Task <IActionResult> Edit([Bind("Examsl,Studentid,Examname,Institution,Board,Result")] Examresult examresult)
 {
     if (ModelState.IsValid)
     {
         try
         {
             _context.Update(examresult);
             await _context.SaveChangesAsync();
         }
         catch (DbUpdateConcurrencyException)
         {
             if (!ExamresultExists(examresult.Examsl, examresult.Studentid))
             {
                 return(NotFound());
             }
             else
             {
                 throw;
             }
         }
         return(RedirectToAction(nameof(Index)));
     }
     ViewData["Studentid"] = new SelectList(_context.Student, "Id", "Id", examresult.Studentid);
     return(View(examresult));
 }
        public async Task <IActionResult> Edit(string id, [Bind("Itemcode,Itemname,Picture")] Items items)
        {
            if (id != items.Itemcode)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(items);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ItemsExists(items.Itemcode))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(items));
        }
        public async Task <IActionResult> Edit(int id, [Bind("Id,Name,Fee,Picture")] Student student)
        {
            if (id != student.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(student);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!StudentExists(student.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(student));
        }