示例#1
0
        public ActionResult Edit(CompanyModel company)
        {
            // server-side validations
            if (company.IsValidToUpdate())
            {
                MvcApplication.Companies.Remove(MvcApplication.Companies.Find(x => x.Id == company.Id));
                MvcApplication.Companies.Add(company);
                MvcApplication.CompanyBusinessLogic.Update(company.ToCompany(CompanyAction.Update));
            }

            return(RedirectToAction("Index"));
        }