public ActionResult Create(Menu menu, string tempstatus) { if (ModelState.IsValid) { if (tempstatus == "Kích Hoạt") { menu.Status = true; } else { menu.Status = false; } MenuDAO menuDAO = new MenuDAO(); var check = menuDAO.Create(menu); if (check > 0) { TempData["msg"] = MessageBox.Show("Create Success"); return(RedirectToAction("Create", "Menu")); } else { ModelState.AddModelError("", "Create fail"); } } SetMenuType(); return(View()); }