예제 #1
0
 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());
     }
 }
예제 #2
0
 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());
     }
 }