using System.Collections.Generic; using System.Web.Mvc; using Neo.Afx.Services.Integration; using Neo.Afx.Services.Workflows; using Neo.Afx.ViewModels; using Neo.LegitimateLicences.Data.Models; using Neo.LegitimateLicences.Web.Models; using Neo.Afx.Admin.Security; using System.Linq; namespace Neo.LegitimateLicences.Web.Controllers { [Authorize] public class HomeController : Neo.LegitimateLicences.Common.ControllerBase { #region Default public ActionResult Default() { var wd = new WorkflowsDatabase(); var viewModel = new HomeModel(); return View("Default", viewModel); } #endregion #region AdvancedSearch public ActionResult AdvancedSearch() { var wd = new WorkflowsDatabase(); var viewModel = new AdvancedSearchModel(); return View("AdvancedSearch", viewModel); } #endregion #region Search public ActionResult Search(string q) { var db = new LegitimateDatabase(); var model = new SearchModel() { SearchResults = db.Search(q, Profile.UserID) }; return View("Search", model); } #endregion } }