public ActionResult Edit(Guid id, CompanyEditModel model)
        {
            SiteMapItem currentNode = GetSiteMapItem(id);

            if (!ModelState.IsValid)
            {
                model.CurrentUrl = currentNode.Url;
                return View(model);
            }

            string companyUrl =
                BusinessShell.RunWithResult(
                    () => new UpdateCompanyOperation(id, model.Abstract, model.IsActive, model.Text ?? String.Empty,
                                                     model.Title, User.Identity.Name, _logoManager.GetFileName(model.LogoUrl),
                                                     model.PhoneNumber ?? String.Empty, model.Address ?? String.Empty,
                                                     model.Email ?? String.Empty,
                                                     model.Hyperlink ?? String.Empty, model.DisplayOnMainMenu, model.DisplayOnSideMenu,
                                                     model.SortOrder));

            return Redirect(companyUrl);
        }
 public ActionResult Edit(Guid id)
 {
     CompanyView company = GetCompany(id);
     var model = new CompanyEditModel
                     {
                         Abstract = company.Abstract,
                         CurrentUrl = company.Url,
                         IsActive = company.IsActive,
                         Text = company.Text,
                         Title = company.Title,
                         Address = company.Address,
                         Email = company.Email,
                         Hyperlink = company.Hyperlink,
                         LogoUrl = _logoManager.GetPath(company.Logo),
                         PhoneNumber = company.PhoneNumber,
                         DisplayOnMainMenu = company.DisplayOnMainMenu,
                         DisplayOnSideMenu = company.DisplayOnSideMenu,
                         SortOrder = company.SortOrder
                     };
     return View(model);
 }