示例#1
0
 public ActionResult TaoMoi()
 {
     if (!CheckSS())
     {
         return(RedirectToAction("DangNhap", "User"));
     }
     else
     {
         DaoTruyen      truyen  = new DaoTruyen();
         DAO.DaoBanDich bandich = new DAO.DaoBanDich();
         ViewBag.NgonNgu   = bandich.GetNgonNgu();
         ViewBag.TheLoai   = truyen.LayTheLoai();
         ViewBag.TrangThai = truyen.LayTrangThai();
         return(View());
     }
 }
示例#2
0
        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));
        }
示例#3
0
        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());
            }
        }