コード例 #1
0
        public ActionResult Index(int solutionId)
        {
            FeatureIndexModel model = new FeatureIndexModel();

            model.SolutionId   = solutionId;
            model.SolutionName = SolutionsLogic.GetSolutionById(solutionId).Name;
            return(View(model));
        }
        //
        // GET: /Feature/

        public ActionResult Index(FeatureIndexModel model)
        {
            if (model.FeatureFilter != null && model.VersionFilter != null)
            {
                int?commitID = SourceControlRepository.FindCommitId(model.VersionFilter);
                if (commitID == null)
                {
                    model.ErrorMessage = "Unknown version: " + model.VersionFilter;
                }
                else
                {
                    model.Entries = new FeatureRepository().GetFeatures(model.FeatureFilter, commitID.Value);
                }
            }
            if (model.VersionFilter == null)
            {
                model.VersionFilter = SourceControlRepository.GetLatestTagName(14);
            }
            if (model.FeatureFilter == null)
            {
                model.FeatureFilter = "%";
            }
            return(View(model));
        }