Пример #1
0
 public List<Project> SelectProjects(ProjectFilter filter, PagingOption option)
 {
     var list = _dal.ProjectRepository.SelectProjects(filter, option);
     foreach(Project item in list)
     {
         FillReferenceProperties(item);
     }
     return list;
 }
Пример #2
0
 public List<Project> SelectProjectsByCategory(string category, int length)
 {
     ProjectFilter filter = new ProjectFilter { Category = category };
     var list = _dal.ProjectRepository.SelectProjects(filter, null);
     list = list.OrderByDescending(item => item.Order).Take(length).ToList();
     foreach (Project item in list)
     {
         FillReferenceProperties(item);
     }
     return list;
 }
Пример #3
0
        public ActionResult ProjectsList(ProjectFilter filter, int page = 1)
        {
            PagingOption option = GetPagingOption(page);

            var model = new ProjectsViewModel
            {
                Projects = bll.ProjectManager.SelectProjects(filter, option),
                PagingOption = new WebPagingOption { CurrentPage = page, ItemsPerPage = PageSize5, TotalItems = option.RecordCount }
            };

            return PartialView(model);
        }
Пример #4
0
 // GET: Portfolio
 public ActionResult Index(ProjectFilter filter)
 {
     var model = new ProjectsViewModel
     {
         Filter = filter,
         ServicedApplicationCategories = bll.ProjectManager.SelectServicedApplicationCategories(),
         ServicedIndustries = bll.ProjectManager.SelectServicedIndustries(),
         Technologies = bll.DictManager.SelectDicts("Technology", string.Empty)
     };
     ViewBag.PortfolioTitle = GetPortfolioTitle(filter);
     return View(model);
 }
Пример #5
0
 private string GetPortfolioTitle(ProjectFilter filter)
 {
     string title = "案例展示";
     if(!string.IsNullOrEmpty(filter.Industry))
     {
         title = bll.DictManager.SelectDict(filter.Industry).Name;
     }
     else if (!string.IsNullOrEmpty(filter.Category))
     {
         title = bll.DictManager.SelectDict(filter.Category).Name;
     }
     else if(!string.IsNullOrEmpty(filter.Technology))
     {
         title = bll.DictManager.SelectDict(filter.Technology).Name;
     }
     return title;
 }
Пример #6
0
 public ActionResult Projects(ProjectFilter filter)
 {
     var model = new ProjectsViewModel
     {
         Filter = filter,
         ServicedApplicationCategories = bll.ProjectManager.SelectServicedApplicationCategories(),
         ServicedIndustries = bll.ProjectManager.SelectServicedIndustries()
     };
     return View(model);
 }