public ActionResult RefreshSearch()
{
ViewBag.Title = PresentationModel.GetViewTitleForTenant("Manage Search", this.Session.GetTenant());
ISearchDesigner sd = GetSearchDesigner();
bool success = false;
try
{
sd.Reload();
success = true;
}
catch (Exception e)
{
ModelState.AddModelError(String.Empty, e.Message);
success = false;
}
finally
{
sd.Dispose();
ISearchProvider provider = IoCFactory.Container.ResolveForSession<ISearchProvider>() as ISearchProvider;
provider.Reload();
}
if(success)
return RedirectToAction("Index","Home",new RouteValueDictionary{{ "area", "DDM" }});
else
return View("SearchDesigner", (List<SearchAttributeViewModel>)Session["searchAttributeList"]);
}