public ActionResult CreateAssignment(AssignmentModel model) { if (ModelState.IsValid) { var info = DBBridge.CreateAssignment(model.AssignmentName, model.AssignmentInfo); if (info == 1) { ViewBag.Message = "The assignment is created successfully!"; } else { ViewBag.Message = "The assignment cannot be created!"; } } return(View()); }