示例#1
0
        public async Task <IActionResult> Edit(string id, [Bind("XpMa,XpTen")] Xaphuong xaphuong)
        {
            if (id != xaphuong.XpMa)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(xaphuong);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!XaphuongExists(xaphuong.XpMa))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(xaphuong));
        }
示例#2
0
        public async Task <IActionResult> Edit(string id, [Bind("ThMa,ThTen")] Tiethoc tiethoc)
        {
            if (id != tiethoc.ThMa)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(tiethoc);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!TiethocExists(tiethoc.ThMa))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(tiethoc));
        }
        public async Task <IActionResult> Edit(string id, [Bind("TkbMa,LopLopMa,MonhocMhMa,ThuThuMa,TiethocThMa,CanboCbMa,HockyHkMa")] Thoikhoabieu thoikhoabieu)
        {
            if (id != thoikhoabieu.TkbMa)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(thoikhoabieu);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ThoikhoabieuExists(thoikhoabieu.TkbMa))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["CanboCbMa"]   = new SelectList(_context.Canbo, "CbMa", "CbMa", thoikhoabieu.CanboCbMa);
            ViewData["HockyHkMa"]   = new SelectList(_context.Hocky, "HkMa", "HkMa", thoikhoabieu.HockyHkMa);
            ViewData["LopLopMa"]    = new SelectList(_context.Lop, "LopMa", "LopMa", thoikhoabieu.LopLopMa);
            ViewData["MonhocMhMa"]  = new SelectList(_context.Monhoc, "MhMa", "MhMa", thoikhoabieu.MonhocMhMa);
            ViewData["ThuThuMa"]    = new SelectList(_context.Thu, "ThuMa", "ThuMa", thoikhoabieu.ThuThuMa);
            ViewData["TiethocThMa"] = new SelectList(_context.Tiethoc, "ThMa", "ThMa", thoikhoabieu.TiethocThMa);
            return(View(thoikhoabieu));
        }
        public async Task <IActionResult> Edit(string id, [Bind("MhMa,MhTen,ChitietdanhgiaCtdgMa")] Monhoc monhoc)
        {
            if (id != monhoc.MhMa)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(monhoc);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!MonhocExists(monhoc.MhMa))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["ChitietdanhgiaCtdgMa"] = new SelectList(_context.Chitietdanhgia, "CtdgMa", "CtdgMa", monhoc.ChitietdanhgiaCtdgMa);
            return(View(monhoc));
        }
        public async Task <IActionResult> Edit(string id, [Bind("SdgMa,SdgDiem,SdgGhichu,NamhocNhMa")] Sodanhgia sodanhgia)
        {
            if (id != sodanhgia.SdgMa)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(sodanhgia);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!SodanhgiaExists(sodanhgia.SdgMa))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["NamhocNhMa"] = new SelectList(_context.Namhoc, "NhMa", "NhMa", sodanhgia.NamhocNhMa);
            return(View(sodanhgia));
        }
示例#6
0
        public async Task <IActionResult> Edit(string id, [Bind("LopMa,LopTen")] Lop lop)
        {
            if (id != lop.LopMa)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(lop);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!LopExists(lop.LopMa))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(lop));
        }
        public async Task <IActionResult> Edit(string id, [Bind("KhoiMa,KhoiTen")] Khoi khoi)
        {
            if (id != khoi.KhoiMa)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(khoi);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!KhoiExists(khoi.KhoiMa))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(khoi));
        }
        public async Task <IActionResult> Edit(string id, [Bind("CvMa,CvTen")] Chucvu chucvu)
        {
            if (id != chucvu.CvMa)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(chucvu);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ChucvuExists(chucvu.CvMa))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(chucvu));
        }
示例#9
0
        public async Task <IActionResult> Edit(string id, [Bind("CtdgMa,CtdgNgaydg,SodanhgiaSdgMa,HocsinhHsMa")] Chitietdanhgia chitietdanhgia)
        {
            if (id != chitietdanhgia.CtdgMa)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(chitietdanhgia);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ChitietdanhgiaExists(chitietdanhgia.CtdgMa))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["HocsinhHsMa"]    = new SelectList(_context.Hocsinh, "HsMa", "HsMa", chitietdanhgia.HocsinhHsMa);
            ViewData["SodanhgiaSdgMa"] = new SelectList(_context.Sodanhgia, "SdgMa", "SdgMa", chitietdanhgia.SodanhgiaSdgMa);
            return(View(chitietdanhgia));
        }
        public async Task <IActionResult> Edit(string id, [Bind("HkMa,HkTen")] Hocky hocky)
        {
            if (id != hocky.HkMa)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(hocky);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!HockyExists(hocky.HkMa))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(hocky));
        }
        public async Task <IActionResult> Edit(string id, [Bind("KlMa,KlHinhthuc,KlNgaykyluat")] Kyluat kyluat)
        {
            if (id != kyluat.KlMa)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(kyluat);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!KyluatExists(kyluat.KlMa))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(kyluat));
        }
        public async Task <IActionResult> Edit(string id, [Bind("QhMa,QhTen")] Quanhuyen quanhuyen)
        {
            if (id != quanhuyen.QhMa)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(quanhuyen);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!QuanhuyenExists(quanhuyen.QhMa))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(quanhuyen));
        }
        public async Task <IActionResult> Edit(string id, [Bind("CbMa,CbHoten,CbGioitinh,CbDiachi,CbNgaysinh,CbCmnd,CoquanCqMa,KyluatcbKlcbMa,KhenthuongcbKtcbMa")] Canbo canbo)
        {
            if (id != canbo.CbMa)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try {
                    _context.Update(canbo);
                    await _context.SaveChangesAsync();
                } catch (DbUpdateConcurrencyException) {
                    if (!CanboExists(canbo.CbMa))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["CoquanCqMa"]         = new SelectList(_context.Coquan, "CqMa", "CqMa", canbo.CoquanCqMa);
            ViewData["KhenthuongcbKtcbMa"] = new SelectList(_context.Khenthuongcb, "KtcbMa", "KtcbMa", canbo.KhenthuongcbKtcbMa);
            ViewData["KyluatcbKlcbMa"]     = new SelectList(_context.Kyluatcb, "KlcbMa", "KlcbMa", canbo.KyluatcbKlcbMa);
            return(View(canbo));
        }
示例#14
0
        public async Task <IActionResult> Edit(string id, [Bind("KtMa,KtThanhtich,KtNgaykhenthuong,KtGhichu")] Khenthuong khenthuong)
        {
            if (id != khenthuong.KtMa)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(khenthuong);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!KhenthuongExists(khenthuong.KtMa))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(khenthuong));
        }
示例#15
0
        public async Task <IActionResult> Edit(string id, [Bind("HsMa,HsHoten,HsGioitinh,HsNgaysinh,HsTongiao,TinhthanhTtMa,XaphuongXpMa,KyluatKlMa,KhenthuongKtMa,QuanhuyenQhMa,DantocDtMa,LopLopMa,KhoiKhoiMa")] Hocsinh hocsinh)
        {
            if (id != hocsinh.HsMa)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(hocsinh);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!HocsinhExists(hocsinh.HsMa))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["DantocDtMa"]     = new SelectList(_context.Dantoc, "DtMa", "DtMa", hocsinh.DantocDtMa);
            ViewData["KhenthuongKtMa"] = new SelectList(_context.Khenthuong, "KtMa", "KtMa", hocsinh.KhenthuongKtMa);
            ViewData["KhoiKhoiMa"]     = new SelectList(_context.Khoi, "KhoiMa", "KhoiMa", hocsinh.KhoiKhoiMa);
            ViewData["KyluatKlMa"]     = new SelectList(_context.Kyluat, "KlMa", "KlMa", hocsinh.KyluatKlMa);
            ViewData["LopLopMa"]       = new SelectList(_context.Lop, "LopMa", "LopMa", hocsinh.LopLopMa);
            ViewData["QuanhuyenQhMa"]  = new SelectList(_context.Quanhuyen, "QhMa", "QhMa", hocsinh.QuanhuyenQhMa);
            ViewData["TinhthanhTtMa"]  = new SelectList(_context.Tinhthanh, "TtMa", "TtMa", hocsinh.TinhthanhTtMa);
            ViewData["XaphuongXpMa"]   = new SelectList(_context.Xaphuong, "XpMa", "XpMa", hocsinh.XaphuongXpMa);
            return(View(hocsinh));
        }