Ejemplo n.º 1
0
        public PartialViewResult ListArtifacts(int id, string active)
        {
            using (var entities = new ExpertiseDBEntities())
            {
                var repository = entities.Repositorys.Find(id);

                var result = new ListArtifactsViewModel
                {
                    ActiveChar   = active,
                    Artifacts    = entities.GetFilesForRepositoryThatStartWithChar(id, active.ToLower()),
                    Name         = repository.Name,
                    RepositoryId = id
                };

                return(PartialView("p_ArtifactsTable", result));
            }
        }
Ejemplo n.º 2
0
        public ActionResult ByArtifact(int id, string active = "a")
        {
            using (var entities = new ExpertiseDBEntities())
            {
                var repository = entities.Repositorys.Find(id);
                if (repository == null)
                {
                    return(HttpNotFound());
                }

                var result = new ListArtifactsViewModel
                {
                    ActiveChar   = active,
                    Artifacts    = entities.GetFilesForRepositoryThatStartWithChar(id, active.ToLower()),
                    Name         = repository.Name,
                    RepositoryId = id
                };

                return(View(result));
            }
        }