public async Task <IActionResult> Create([Bind("ThuMa,ThuTen")] Thu thu)
        {
            if (ModelState.IsValid)
            {
                _context.Add(thu);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(thu));
        }
Пример #2
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));
        }
        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));
        }
Пример #5
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));
        }
Пример #8
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));
        }