コード例 #1
0
        public ActionResult Index()
        {
            var viewModel = new LinkListViewModel
            {
                Title = "What's in store?",
                Links = new Dictionary<string, string>
                    {
                        { Url.Action("ProjectNamesView", "Builds"), "Builds" }
                    }
            };

            return View("LinkListView", viewModel);
        }
コード例 #2
0
        public ActionResult Index()
        {
            var viewModel = new LinkListViewModel
            {
                Title = "What's in store?",
                Links = new Dictionary <string, string>
                {
                    { Url.Action("ProjectNamesView", "Builds"), "Builds" }
                }
            };

            return(View("LinkListView", viewModel));
        }
コード例 #3
0
        public ActionResult ProjectNamesView()
        {
            var projectNames = buildService.GetProjects();

            var viewModel = new LinkListViewModel
            {
                Title = "Projects on TFS",
                Links = projectNames.ToDictionary(
                    projectName => Url.Action("BuildNamesView", new { projectName }),
                    projectName => projectName)
            };

            return View("LinkListView", viewModel);
        }
コード例 #4
0
        public ActionResult BuildNamesView(string projectName)
        {
            var buildNames = buildService.GetBuildDefinitions(projectName);

            var viewModel = new LinkListViewModel
            {
                Title = string.Format("Builds for project {0}", projectName),
                Links = buildNames.ToDictionary(
                    buildName => Url.Action("BuildTimelineView", new { projectName, buildName }),
                    buildName => buildName)
            };

            return View("LinkListView", viewModel);
        }
コード例 #5
0
        public ActionResult BuildNamesView(string projectName)
        {
            var buildNames = buildService.GetBuildDefinitions(projectName);

            var viewModel = new LinkListViewModel
            {
                Title = string.Format("Builds for project {0}", projectName),
                Links = buildNames.ToDictionary(
                    buildName => Url.Action("BuildTimelineView", new { projectName, buildName }),
                    buildName => buildName)
            };

            return(View("LinkListView", viewModel));
        }
コード例 #6
0
        public ActionResult ProjectNamesView()
        {
            var projectNames = buildService.GetProjects();

            var viewModel = new LinkListViewModel
            {
                Title = "Projects on TFS",
                Links = projectNames.ToDictionary(
                    projectName => Url.Action("BuildNamesView", new { projectName }),
                    projectName => projectName)
            };

            return(View("LinkListView", viewModel));
        }
コード例 #7
0
        /// <summary>
        /// 链接管理
        /// </summary>
        /// <returns></returns>
        public ActionResult LinkManage(string link_type)
        {
            return(RunActionWhenLogin((loginuser) =>
            {
                if (!ValidateHelper.IsPlumpString(link_type))
                {
                    return new GoHomeResult();
                }
                var model = new LinkListViewModel();

                model.LinkType = link_type;
                model.LinkList = _ILinkService.GetTopLinks(link_type, 1000);
                ViewData["model"] = model;
                return View();
            }));
        }