Exemplo n.º 1
0
        public ActionResult AddCompany()
        {
            ViewBag.Title = "Add company";

            Company model;

            try
            {
                model = companiesService.CreateCompany();
            }
            catch (System.Exception ex)
            {
                return(RedirectToAction("GetCompaniesList", new { errorMessage = ex.Message }));
            }

            return(View(model));
        }