public ActionResult CreateCompany(Company c) { if (ValidateCompany.IsValid(c)) { Session["Company"] = c; return(RedirectToAction("CreateOwner")); } else { ViewBag.Error = null; ViewBag.Error = ValidateCompany.Message; return(View()); } }
public ActionResult Edit(Company c) { if (ValidateCompany.IsValid(c)) { ServiceFactory.GetCompanyServices().Update(c); return(RedirectToAction("Details")); } else { ViewBag.Error = null; ViewBag.Error = ValidateCompany.Message; return(View()); } }