public ActionResult ThemMoi(BanDichModel model) { DAO.DaoBanDich bandich = new DAO.DaoBanDich(); ViewBag.TenTruyen = bandich.GetTenTruyen(model.MaProject); ViewBag.NgonNgu = bandich.GetNgonNgu(); ViewBag.User = bandich.GetNguoiDung(); ViewBag.id = model.MaProject; if (ModelState.IsValid) { if (bandich.Add(bandich.GetBanDich(model)) > 0) { return(RedirectToAction("QuanLyTruyenDaTao", "Truyen")); } } return(View(model)); }
public ActionResult ThemMoi(int id) { if (!CheckSS()) { return(RedirectToAction("DangNhap", "User")); } else { DAO.DaoBanDich bandich = new DAO.DaoBanDich(); ViewBag.TenTruyen = bandich.GetTenTruyen(id); ViewBag.NgonNgu = bandich.GetNgonNgu(); ViewBag.User = bandich.GetNguoiDung(); ViewBag.DsBanDich = bandich.GetBanDichDaCo(id); ViewBag.id = id; return(View()); } }