public async Task <IActionResult> Create([Bind("VbMa,VbTen")] Vanbang vanbang)
        {
            if (ModelState.IsValid)
            {
                _context.Add(vanbang);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(vanbang));
        }
        public async Task <IActionResult> Create([Bind("KlMa,KlHinhthuc,KlNgaykyluat")] Kyluat kyluat)
        {
            if (ModelState.IsValid)
            {
                _context.Add(kyluat);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(kyluat));
        }
Esempio n. 3
0
        public async Task <IActionResult> Create([Bind("DtMa,DtTen")] Dantoc dantoc)
        {
            if (ModelState.IsValid)
            {
                _context.Add(dantoc);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(dantoc));
        }
        public async Task <IActionResult> Create([Bind("QhMa,QhTen")] Quanhuyen quanhuyen)
        {
            if (ModelState.IsValid)
            {
                _context.Add(quanhuyen);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(quanhuyen));
        }
        public async Task <IActionResult> Create([Bind("KhoiMa,KhoiTen")] Khoi khoi)
        {
            if (ModelState.IsValid)
            {
                _context.Add(khoi);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(khoi));
        }
Esempio n. 6
0
        public async Task <IActionResult> Create([Bind("ThMa,ThTen")] Tiethoc tiethoc)
        {
            if (ModelState.IsValid)
            {
                _context.Add(tiethoc);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(tiethoc));
        }
Esempio n. 7
0
        public async Task <IActionResult> Create([Bind("KtMa,KtThanhtich,KtNgaykhenthuong,KtGhichu")] Khenthuong khenthuong)
        {
            if (ModelState.IsValid)
            {
                _context.Add(khenthuong);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(khenthuong));
        }
Esempio n. 8
0
        public async Task <IActionResult> Create([Bind("UserName,PassWord")] Login login)
        {
            if (ModelState.IsValid)
            {
                _context.Add(login);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(login));
        }
Esempio n. 9
0
        public async Task <IActionResult> Create([Bind("XpMa,XpTen")] Xaphuong xaphuong)
        {
            if (ModelState.IsValid)
            {
                _context.Add(xaphuong);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(xaphuong));
        }
Esempio n. 10
0
        public async Task <IActionResult> Create([Bind("LopMa,LopTen")] Lop lop)
        {
            if (ModelState.IsValid)
            {
                _context.Add(lop);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(lop));
        }
        public async Task <IActionResult> Create([Bind("NhMa,NhNamhoc")] Namhoc namhoc)
        {
            if (ModelState.IsValid)
            {
                _context.Add(namhoc);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(namhoc));
        }
        public async Task <IActionResult> Create([Bind("CvMa,CvTen")] Chucvu chucvu)
        {
            if (ModelState.IsValid)
            {
                _context.Add(chucvu);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(chucvu));
        }
        public async Task <IActionResult> Create([Bind("HkMa,HkTen")] Hocky hocky)
        {
            if (ModelState.IsValid)
            {
                _context.Add(hocky);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(hocky));
        }
        public async Task <IActionResult> Create([Bind("NlMa,NlTen")] Ngachluong ngachluong)
        {
            if (ModelState.IsValid)
            {
                _context.Add(ngachluong);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(ngachluong));
        }
        public async Task <IActionResult> Create([Bind("MhMa,MhTen,ChitietdanhgiaCtdgMa")] Monhoc monhoc)
        {
            if (ModelState.IsValid)
            {
                _context.Add(monhoc);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["ChitietdanhgiaCtdgMa"] = new SelectList(_context.Chitietdanhgia, "CtdgMa", "CtdgMa", monhoc.ChitietdanhgiaCtdgMa);
            return(View(monhoc));
        }
        public async Task <IActionResult> Create([Bind("SdgMa,SdgDiem,SdgGhichu,NamhocNhMa")] Sodanhgia sodanhgia)
        {
            if (ModelState.IsValid)
            {
                _context.Add(sodanhgia);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["NamhocNhMa"] = new SelectList(_context.Namhoc, "NhMa", "NhMa", sodanhgia.NamhocNhMa);
            return(View(sodanhgia));
        }
Esempio n. 17
0
        public async Task <IActionResult> Create([Bind("CtdgMa,CtdgNgaydg,SodanhgiaSdgMa,HocsinhHsMa")] Chitietdanhgia chitietdanhgia)
        {
            if (ModelState.IsValid)
            {
                _context.Add(chitietdanhgia);
                await _context.SaveChangesAsync();

                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> Create([Bind("CbMa,CbHoten,CbGioitinh,CbDiachi,CbNgaysinh,CbCmnd,CoquanCqMa,KyluatcbKlcbMa,KhenthuongcbKtcbMa")] Canbo canbo)
        {
            if (ModelState.IsValid)
            {
                _context.Add(canbo);
                await _context.SaveChangesAsync();

                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));
        }
        public async Task <IActionResult> Create([Bind("TkbMa,LopLopMa,MonhocMhMa,ThuThuMa,TiethocThMa,CanboCbMa,HockyHkMa")] Thoikhoabieu thoikhoabieu)
        {
            if (ModelState.IsValid)
            {
                _context.Add(thoikhoabieu);
                await _context.SaveChangesAsync();

                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));
        }
Esempio n. 20
0
        public async Task <IActionResult> Create([Bind("HsMa,HsHoten,HsGioitinh,HsNgaysinh,HsTongiao,TinhthanhTtMa,XaphuongXpMa,KyluatKlMa,KhenthuongKtMa,QuanhuyenQhMa,DantocDtMa,LopLopMa,KhoiKhoiMa")] Hocsinh hocsinh)
        {
            if (ModelState.IsValid)
            {
                _context.Add(hocsinh);
                await _context.SaveChangesAsync();

                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));
        }