Beispiel #1
0
        public async Task <IActionResult> Edit(int id, [Bind("Id,pyear,pmonth,studentid,rollid,ammount")] Payment Payment)
        {
            if (id != Payment.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(Payment);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!PaymentExists(Payment.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(Payment));
        }
Beispiel #2
0
        public async Task <IActionResult> Edit(int id, [Bind("Id,StudentName,RollNo,Math,English,Bangla,Physics,Chemistry,Biology,Religion,HigherMath,Agriculture,Philosophy,Ict")] Mark mark)
        {
            if (id != mark.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(mark);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!MarkExists(mark.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(mark));
        }
Beispiel #3
0
        public async Task <IActionResult> details(int id, [Bind("Id,Name,Address,Class")] 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));
        }
Beispiel #4
0
        public async Task <IActionResult> Edit(int id, [Bind("Id,Name,Rollno,SClass,Year,Studentid")] StudentAccount StudentAccount)
        {
            if (id != StudentAccount.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(StudentAccount);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!StudentAccountExists(StudentAccount.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(StudentAccount));
        }
Beispiel #5
0
        public async Task <IActionResult> Edit(int id, [Bind("Id,name,roll,rollid,totalammount,due")] Paymentinfo Paymentinfo)
        {
            if (id != Paymentinfo.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(Paymentinfo);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!PaymentinfoExists(Paymentinfo.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(Paymentinfo));
        }
Beispiel #6
0
        public async Task <IActionResult> Edit(int id, [Bind("Id,Name,email")] admission admission)
        {
            if (id != admission.Id)
            {
                return(NotFound());
            }

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