public ActionResult CompanyRegister(CompanyViewModel newCompany) { PractitionerProcess process = new PractitionerProcess(); TempData["ConflictEmailAddress"] = ""; if (Request.Form["Submit"] != null) { if (newCompany.CompanyEmailAddress.Equals(newCompany.ReconfirmEmail)) { if (ModelState.IsValid) { int result = process.CompanyRegister(newCompany); if (result == 1) { TempData["CompanySuccess"] = "CompanySuccess"; return(RedirectToAction("AccCreateSuccess", "HomePage", null)); } else if (result == 2) { TempData["ConflictEmailAddress"] = "ConflictEmailAddress"; return(View(newCompany)); } else { return(View(newCompany)); } } } else { return(View(newCompany)); } } return(View(newCompany)); }