public ActionResult CreateAdmin(JobCardAdminView jobCardView) { if (ModelState.IsValid) { if (jobCardView.CustomerID == null || jobCardView.DesignerID == null || jobCardView.JobTypeID == null || jobCardView.MaterialID == null) { return(CreateAdmin()); } JobCardManager manager = new JobCardManager(); jobCardView.CreatedID = manager.GetUserID(User.Identity.Name); jobCardView.CreatedDate = DateTime.Now; manager.CreateJobCard(jobCardView); return(RedirectToAction("Index")); } return(CreateAdmin()); }