public ActionResult Create(PROPERTY_TYPE collection) { try { // TODO: Add insert logic here if (ModelState.IsValid) { var model = new Project_TypeModel(); int res = model.Create(collection.CodeType, collection.Status); if (res > 0) { return(RedirectToAction("Index")); } else { ModelState.AddModelError("", "Thêm mới không thành công"); } } return(View(collection)); } catch { return(View()); } }